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

Laravel "required_without" rules not working properly for me #14

Closed
lorenzodalaqua opened this issue May 11, 2015 · 5 comments
Closed
Assignees
Labels
Milestone

Comments

@lorenzodalaqua
Copy link

Hello, really good work with this package, it is simple and effective.
I am only having problems with the "required_without" and "required_without_all" rules in my application.

I have a field 'email' which should be required if none of fields 'phone1', 'phone2' and 'phone3' are present (required_without_all), and field 'phone1' should be required if 'email' is not present (required_without).

When all fields are empty it works as expected, validation fails giving a message that field is required when the other is not present. The problem is when I fill in any of the fields, validation still fails (e.g. phone1 is present and email is empty, but validation fails saying "phone1 is required when email is not present"), even if all fields are filled correctly the validator will keep failing saying a field is required when the other is empty when both fields are filled.

I have tested my code without jsvalidation and the Laravel validation works as expected, only when I add JS validation I get this error.

The generated HTML for the page is here: http://pastebin.com/rapW1yva

I am still a newbie in this, so I hope this is a valid issue, if it is not, excuse me.

Regards,
Lorenzo

@torrentalle torrentalle self-assigned this May 17, 2015
@torrentalle
Copy link
Member

I'm workin in this bug. The rules required_without and required_without_alldoesn't work as expected

torrentalle pushed a commit that referenced this issue May 17, 2015
@torrentalle
Copy link
Member

The bugfix will be published in the next release.
To solve this issue now, replace this files

@lorenzodalaqua
Copy link
Author

Thank you very much, it worked perfectly.

@torrentalle torrentalle added this to the 1.1.0 milestone May 21, 2015
@torrentalle
Copy link
Member

This bug is fixed in master branch

@fatenfalfoul
Copy link

Hello I have the same problem and I can't find the files : 404: Not Found
Help please

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

No branches or pull requests

3 participants