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