We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9159290 commit f590c1dCopy full SHA for f590c1d
src/Validator.php
@@ -59,7 +59,7 @@ public function notEmpty()
59
{
60
return $this->assertCallback(
61
function ($value) {
62
- return strlen(trim($value)) > 0;
+ return $value !== null && strlen(trim($value)) > 0;
63
},
64
'is empty'
65
);
@@ -76,7 +76,7 @@ public function isInteger()
76
77
78
79
- return ctype_digit($value);
+ return $value !== null && ctype_digit($value);
80
81
'is not an integer'
82
@@ -93,7 +93,7 @@ public function isBoolean()
93
94
95
96
- if ($value === '') {
+ if ($value === null || $value === '') {
97
return false;
98
}
99
0 commit comments