mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
改进Validate类的boolean验证规则 支持表单数据
This commit is contained in:
@@ -551,7 +551,7 @@ class Validate
|
|||||||
break;
|
break;
|
||||||
case 'boolean':
|
case 'boolean':
|
||||||
// 是否为布尔值
|
// 是否为布尔值
|
||||||
$result = $this->filter($value, FILTER_VALIDATE_BOOLEAN);
|
$result = in_array($value, ['true', 'false', 0, 1, true, false]);
|
||||||
break;
|
break;
|
||||||
case 'array':
|
case 'array':
|
||||||
// 是否为数组
|
// 是否为数组
|
||||||
|
|||||||
Reference in New Issue
Block a user