Nested validation howto?


#1

i have a field ‘to pay’ or ‘free’
and 3 price fields.

If field to pay = 1 then one of the 3 price fields must be filled in otherwise they can be blank

Need validation for that :

With requiredWithoutAll i can make that one of the 3 price fields must be filled in

but how can i combine it with requiredIf in a nesting ?

thanks


#2

I shared the answer to this on Discord, that you need to create your own rule to validate this behavior.

There is no harm in creating custom rules