-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Describe how empty strings affect the validation of string constraints #4244
Comments
This does not only affect string related validators. Quoting from #5122:
|
I think we can add this in the table for each constraint in the reference. |
This was partially handled in #5288 (just for |
If we can't come up with a list of constraints to update, we'll need to close this as "solved", ... because |
Fixed by #10407. |
For example, when an empty string is validated through the
Length
constraint, it is considered to be valid no matter if the constraint required a minimum length (see symfony/symfony#11943). It should be made clear that you also have to use theNotBlank
constraint to disallow empty strings too.Note that the
Length
constraint isn't the only constraint with this behaviour.The text was updated successfully, but these errors were encountered: