Skip to content

Commit e1a2f3d

Browse files
committed
some update
1 parent e52f20e commit e1a2f3d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ $v = Validation::make($_POST,[
537537
`isMap` | 验证值是否是一个非自然数组 map (key - value 形式的) | `['goods', 'isMap']`
538538
`isList` | 验证值是否是一个自然数组 list (key是从0自然增长的) | `['tags', 'isList']`
539539
`isArray` | 验证是否是数组 | `['goods', 'isArray']`
540-
`each` | 对数组中的每个值都应用给的验证器(这里的绝大多数都可以使用),并且要全部通过 | `['goods.*', 'each', 'string']`, `['goods.*', 'each', 'string', 'min' => 3]`
540+
`each` | 对数组中的每个值都应用给定的验证器(这里的绝大多数验证器都可以使用),并且要全部通过 | `['goods.*','each','string']`, `['goods.*','each','string','min'=>3]`
541541
`hasKey` | 验证数组存在给定的key(s) | `['goods', 'hasKey', 'pear']` `['goods', 'hasKey', ['pear', 'banana']]`
542542
`distinct` | 数组中的值必须是唯一的 | `['goods', 'distinct']`, `['users.*.id', 'distinct']`
543543
`intList` | 验证字段值是否是一个 int list | `['tagIds', 'intList']`

src/Utils/UserAndContextValidatorsTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ public function eachValidator(array $values, ...$args)
490490
if ('required' === $validator) {
491491
$passed = !ValidatorList::isEmpty($value);
492492

493-
} elseif (isset(self::$_validators[$validator])) {
493+
} elseif (isset(self::$_validators[$validator])) {
494494
$callback = self::$_validators[$validator];
495495
$passed = $callback($value, ...$args);
496496

0 commit comments

Comments
 (0)