Skip to content
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

ConvertEmptyStringsToNull #18414

Closed
zeyad82 opened this issue Mar 19, 2017 · 3 comments
Closed

ConvertEmptyStringsToNull #18414

zeyad82 opened this issue Mar 19, 2017 · 3 comments

Comments

@zeyad82
Copy link

zeyad82 commented Mar 19, 2017

  • Laravel Version: 5.4

Description:

I am facing an annoying issue. When I am using required_if and string validation, if required_if is false, it doesn't pass string validation, because of the null value. If I add nullable to the validation, it passes required_if, even if the condition is true.
I think we need to add attribute "except" to ConvertEmptyStringsToNull like with TrimStrings.

@ankurk91
Copy link
Contributor

See #17663

@zeyad82
Copy link
Author

zeyad82 commented Mar 20, 2017

I haven't seen a good solution there.
I overrode the ConvertEmptyStringsToNull middleware and it worked fine.

image

@themsaid
Copy link
Member

That was fixed in #18376

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants