You need to create a custom rule for that using Laravel custom validation rules
https://laravel.com/docs/6.x/validation#using-rule-objects
And then attach that rule to your repair cost field.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi, i"m struggling doing this in nova:
there is a form for repair product.
you must enter "repair cost" only if warranty = "noWarranty" and repair = "completed"
warranty and repair are cells on the same form and you can't get them from the database yet
(You do not know the repair cost before the lab fully fixed it).
i can use ->rules('required_if:warranty,noWarranty')
however if i use "required_if" twice ->rules('required_if:warranty,noWarranty','required_if:repair,completed')
it will be required if
warranty = "noWarranty" or repair = "completed"
and i need it to be required if
warranty = "noWarranty" and repair = "completed"
Please or to participate in this conversation.