Laravel Validation check array size min and max

You can use between. . https://laravel.com/docs/5.2/validation#rule-between

For example:

'users' => 'required|array|between:2,4'

It is not explicitly stated in the docs, but it works with arrays, just like size.

For more details, read validating array lengths in Laravel


A little bit late:

return [
    "ticket_photo" => ["required","array","min:2","max:4"], // validate an array contains minimum 2 elements and maximum 4 
    "ticket_photo.*" => ["required","mimes:jpeg,jpg,png,gif"], // and each element must be a jpeg or jpg or png or gif file 
];

laravel 5.6