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
So I have two fields - street and state. I want them to be required if the other is missing. So if the user enters the street OR the state OR both, the validation should pass. But if none of them are present should fail.
I tried:
'street ' => 'required_without:state',
'state' => 'required_without:street '
But if none of them is present the validation passes. Actually it passes anyhow - with both of them, without any of them, with one of them.
If the rules is only "required" the validation fails if they are not present.
I am using php 7.4
The text was updated successfully, but these errors were encountered:
So I have two fields - street and state. I want them to be required if the other is missing. So if the user enters the street OR the state OR both, the validation should pass. But if none of them are present should fail.
I tried:
'street ' => 'required_without:state',
'state' => 'required_without:street '
But if none of them is present the validation passes. Actually it passes anyhow - with both of them, without any of them, with one of them.
If the rules is only "required" the validation fails if they are not present.
I am using php 7.4
The text was updated successfully, but these errors were encountered: