改进Validate类的闭包规则错误

This commit is contained in:
thinkphp
2016-12-13 14:47:43 +08:00
parent f77a48930a
commit 965e14eb76

View File

@@ -362,6 +362,7 @@ class Validate
foreach ($rules as $key => $rule) {
if ($rule instanceof \Closure) {
$result = call_user_func_array($rule, [$value, $data]);
$info = is_numeric($key) ? '' : $key;
} else {
// 判断验证类型
if (is_numeric($key)) {