Answers for "laravel validation item in array"

PHP
1

how to check exist in array in rule validation laravel

['someProperty' => ['required', Rule::in(['needed', 'stuff'])]];
Posted by: Guest on October-10-2021
2

validate each value from array laravel

$validator = Validator::make($request->all(), [
    "names"    => "required|array|min:3",
    "names.*"  => "required|string|distinct|min:3",
]);
Posted by: Guest on November-12-2020

Code answers related to "laravel validation item in array"

Browse Popular Code Answers by Language