You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is this kind of rule interesting for "Laravel Validation Rules"? It seems this collection of rule is about "things" (like credit card), not generic rules: so maybe such a rule does not have its place here. What do you think? Should I submit a PR?
The text was updated successfully, but these errors were encountered:
Here is a question I asked on Stackoverflow about a validation rule. It seems it does not exists.
My question is about Laravel validation rules.
I have two inputs
a
andb
.a
is a select input with three possible values:x
,y
andz
. I want to write this rule:Is there a way to write such a rule? I tried
required_with
,required_without
but it seems it can not cover my case.In other words, if the previous explanation was not clear enough:
a
==x
,b
must have a value.a
!=x
,b
must be empty.Original Post: https://stackoverflow.com/questions/48420718/required-field-only-if-another-field-has-a-value-must-be-empty-otherwise
Is this kind of rule interesting for "Laravel Validation Rules"? It seems this collection of rule is about "things" (like credit card), not generic rules: so maybe such a rule does not have its place here. What do you think? Should I submit a PR?
The text was updated successfully, but these errors were encountered: