[validation] Return null on invalid number
This commit is contained in:
parent
54e8bb2228
commit
e4fa963bdf
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ function validateData(&$data, $parameters){
|
|||
$validateNumberValue = function($value){
|
||||
$filteredValue = filter_var($value, FILTER_VALIDATE_INT);
|
||||
|
||||
if($filteredValue === false && !empty($value))
|
||||
if($filteredValue === false)
|
||||
return null;
|
||||
|
||||
return $filteredValue;
|
||||
|
|
Loading…
Reference in a new issue