mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
改进Validate类的number验证规则 和 integer区分开
This commit is contained in:
@@ -541,6 +541,8 @@ class Validate
|
|||||||
$result = $this->filter($value, FILTER_VALIDATE_FLOAT);
|
$result = $this->filter($value, FILTER_VALIDATE_FLOAT);
|
||||||
break;
|
break;
|
||||||
case 'number':
|
case 'number':
|
||||||
|
$result = is_numeric($value);
|
||||||
|
break;
|
||||||
case 'integer':
|
case 'integer':
|
||||||
// 是否为整形
|
// 是否为整形
|
||||||
$result = $this->filter($value, FILTER_VALIDATE_INT);
|
$result = $this->filter($value, FILTER_VALIDATE_INT);
|
||||||
|
|||||||
Reference in New Issue
Block a user