vendredi 6 septembre 2019

Laravel Validation, a field should be 1 if another field is 0 and viceversa

suppose, i have a request object which sends

[
 a => 0,
 b => 0
]

I want to have a validation, which will result to an error as both a and b are 0. I need at least one to be 1. how can I do that? Another working eg:

[
 a => 0,
 b => 1
]

it should pass



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2ZEfPEc
via IFTTT

Aucun commentaire:

Enregistrer un commentaire