FilamentF
Filament3y ago
Abi

Validating a fields with multiple required_if conditions.

a laravel validation question. how can I use the required_if condition with 2 fields? I am using the rules() method to define it, but not sure how exactly to do it.

required_if field_1=0 and field_2 = 'x'


I tried to look at the docs, I came across the when method on the validation for multiple conditions, but not sure if there is a straight-forward answer to this?
Was this page helpful?