-
-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate and remove SPACE case for NotEmpty validator #229
Labels
Comments
I kind of agree, but validator does not depend on If you have strong feelings here, v3 is getting pretty close… |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
NotEmpty validator considers string
' '
empty by default due tospace
case. It is a surprising behavior that apparently got inherited from ZF1 over 12 years ago.laminas-validator/src/NotEmpty.php
Lines 64 to 71 in fac99d7
In case of laminas-inputfilter it would be a filter responsibility to remove spaces or anything else like line feed before validation.
I would say this condition is useful only for laminas-form and only for a sloppy input filter definitions. This case should really be handled by the trim filter.
The text was updated successfully, but these errors were encountered: