Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Validator] deprecate the "allowEmptyString" option#36818
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
xabbuh commentedMay 15, 2020
| Q | A |
|---|---|
| Branch? | master |
| Bug fix? | no |
| New feature? | no |
| Deprecations? | yes |
| Tickets | Fix#36812 |
| License | MIT |
| Doc PR |
derrabus commentedMay 16, 2020
Can we deprecate the |
xabbuh commentedMay 20, 2020
Good idea, this was actually suggested when the option was introduced in 4.4 (see#31528):
|
6df1211 tofbbde1eCompareUh oh!
There was an error while loading.Please reload this page.
7f518d4 toa95b7a3Comparefabpot commentedMay 22, 2020
Thank you@xabbuh. |
xosofox commentedJul 28, 2021
Just wondering how we can achieve the "old behaviour" now when combining min, max and allowEmptyString=true It used to be "ok" to have have either an empty string OR apply min-max-constraints - this is gone now. Or am I missing something? |
xabbuh commentedJul 28, 2021
Precisely for such use cases you can combine the |
…rjohnson)This PR was merged into the 6.0 branch.Discussion----------[Validator] Update Length Validator Empty String DocsEmpty strings are no longer valid if a min is passed, null values stillvalidate.Changed in 6.0 along with dropping the deprecated `allowEmptyString`symfony/symfony#36818 option. There is some discussion that this is the intended behavior insymfony/symfony#45993Commits-------9fa967e Update Length Validator Empty String Docs