request()->validate([ 'images' => 'max:5', // checks length of array 'images.*' => 'max:2048', // checks file size ]);