Skip to content

Commit

Permalink
Update Validate.php
Browse files Browse the repository at this point in the history
  • Loading branch information
lphkxd authored Aug 17, 2020
1 parent 1ba7998 commit 882c292
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Validate/Validate.php
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,9 @@ public function check(array $data, array $rules = [], $prefix = ''): bool
case $rule instanceof ValidateRule:
$result = $this->checkItem($key, $value, $rule->getRule(), $data, $rule->getTitle() ?: $title, $rule->getMsg());
break;
case is_array($rule) && is_integer(key($rule)): #判断是否是二维数组验证
$result = $this->checkItem($key, $value, $rule, $data, $title);
break;
case is_array($rule):
if (!is_array($data[$key])) {
$result = $key . "必须为二维数组";
Expand Down

0 comments on commit 882c292

Please sign in to comment.