修正验证类的布尔值规则

This commit is contained in:
thinkphp
2017-01-20 12:37:25 +08:00
parent e1b35abd51
commit 35ae8decf7

View File

@@ -591,7 +591,7 @@ class Validate
break; break;
case 'boolean': case 'boolean':
// 是否为布尔值 // 是否为布尔值
$result = in_array($value, [0, 1, true, false]); $result = in_array($value, [true, false, 0, 1, '0', '1'], true);
break; break;
case 'array': case 'array':
// 是否为数组 // 是否为数组