Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel validate input belongs to an array

'option' => [ 'required', Rule::in(['option1', 'option2']) ];

//docs link: https://laravel.com/docs/9.x/validation#rule-in
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #validate #input #belongs #array
ADD COMMENT
Topic
Name
9+4 =