laravel validation rules array code example
Example 1: laravel validate integer between
'item' => 'required|integer|between:1,10',
Example 2: validate each value from array laravel
$validator = Validator::make($request->all(), [
"names" => "required|array|min:3",
"names.*" => "required|string|distinct|min:3",
]);
Example 3: laravel validation
Validator::extend('foo', 'FooValidator@validate');