Laravel Validation for Array Example

Admin   Laravel   498  2021-03-17 02:50:07

Hii Guys,

In this example,I want to show you validation for array in laravel. you can simply and easy to set validation for array length in laravel.

you can create to one or more fildes in laravel form. you can set to name of field in laravel form. This validation check array formate value.


you can apply to logic in your controller.



* The attributes that are mass assignable.


* @var array


public function store(Request $request)


$input = $request->all();

$validator = $request->validate([

"name" => "required|array|min:3",

"name.*" => "required|string|distinct|min:3",


// Write Logic


It will help you.....