Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel required only one of multiple fields not both

prohibited
The field under validation must be empty or not present.

prohibited_if:anotherfield,value,...
The field under validation must be empty or not present if the anotherfield field is equal to any value.

prohibited_unless:anotherfield,value,...
The field under validation must be empty or not present unless the anotherfield field is equal to any value.

prohibits:anotherfield,...
If the field under validation is present, no fields in anotherfield can be present, even if empty.
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #required #multiple #fields
ADD COMMENT
Topic
Name
5+2 =