We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d823be5 + 73b011c commit fdcfb58Copy full SHA for fdcfb58
1 file changed
lib/Validators/BaseValidator.php
@@ -104,6 +104,14 @@ private function not_null($value): bool {
104
* @return bool
105
*/
106
private function not_empty($value): bool {
107
+ // Treat string zero as a valid non-empty value while still rejecting other empty values
108
+ if ($value === '0') {
109
+ return true;
110
+ }
111
+
112
+ if (is_string($value)) {
113
+ return strlen(trim($value)) > 0;
114
115
return !empty($value);
116
}
117
0 commit comments