Fiiiiiiix
This commit is contained in:
parent
e4b2284d80
commit
727e168312
|
@ -300,16 +300,16 @@ class Validator
|
||||||
$success = !(is_null($value));
|
$success = !(is_null($value));
|
||||||
break;
|
break;
|
||||||
case 'integer':
|
case 'integer':
|
||||||
$success = (filter_var($value, FILTER_VALIDATE_INT) ? true : false);
|
$success = (filter_var($value, FILTER_VALIDATE_INT) !== false);
|
||||||
break;
|
break;
|
||||||
case 'float':
|
case 'float':
|
||||||
$success = (filter_var($value, FILTER_VALIDATE_FLOAT) ? true : false);
|
$success = (filter_var($value, FILTER_VALIDATE_FLOAT) !== false);
|
||||||
break;
|
break;
|
||||||
case 'boolean':
|
case 'boolean':
|
||||||
$success = (filter_var($value, FILTER_VALIDATE_BOOLEAN) ? true : false);
|
$success = (filter_var($value, FILTER_VALIDATE_BOOLEAN) !== false);
|
||||||
break;
|
break;
|
||||||
case 'email':
|
case 'email':
|
||||||
$success = (filter_var($value, FILTER_VALIDATE_EMAIL) ? true : false);
|
$success = (filter_var($value, FILTER_VALIDATE_EMAIL) !== false);
|
||||||
break;
|
break;
|
||||||
case 'phone':
|
case 'phone':
|
||||||
$_pattern = "/^\+?\d{7,15}$/";
|
$_pattern = "/^\+?\d{7,15}$/";
|
||||||
|
|
Loading…
Reference in New Issue