-
Notifications
You must be signed in to change notification settings - Fork 708
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
Add allowBlank option to queryparam #886
Conversation
I'm not sure how the nullable option should work. i don't really get the difference. maybe this is redundant but the nullable option doesn't work? |
@ClementGautier can you have a look here? |
ping |
Sorry for the delay. 👍 because we already have a |
if (null === $value || '' === $value) {
return;
} Since the RegexValidator#L37 ignores everything that is null or an empty string, I think even if you're using a constraint with a regex that doesn't allow an empty string, the validation will pass. So 👍 is a go for a merge? |
@mosch You can combine NotNull and Regex with a All constraint, I think it could work. But yes, as I said I'm ok with allowBlank option. |
great, i think i should go and extend the test and then we can go for the merge. anything else missing? |
i think it could should also be added in the testExceptionOnValidatesFailure() test, but the class is confusing to me a litte. any advice? |
@mosch I dont think its necessary. We only test strict cases on this test and, in this PR we only add "white cases" possibilities (which are covered by testValidatesConfiguredParam) |
I guess this is ready to merge? |
needs a rebase |
fixes issue FriendsOfSymfony#814 rebased
did the rebase, everything should be fine now. |
Add allowBlank option to queryparam
👍 thanks |
fixes issue #814