Skip to content
Permalink
Browse files

Simplify _fieldIsEmpty() conditions

  • Loading branch information...
johanmeiring committed Jan 30, 2017
1 parent 17e96e1 commit 7cc6d5a6967c0a5d4ff0e78e37f5e8820f776227
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Validation/Validator.php
@@ -1715,7 +1715,7 @@ protected function _canBeEmpty($field, $context)
*/
protected function _fieldIsEmpty($data)
{
if (empty($data) && $data !== '0' && $data !== false && $data !== 0 && $data !== 0.0) {
if (empty($data) && !is_bool($data) && !is_numeric($data)) {
return true;
}
$isArray = is_array($data);

0 comments on commit 7cc6d5a

Please sign in to comment.
You can’t perform that action at this time.