Level 60
name="modelF[]" and 'videos.*' should match
Hello, i have a file upload field:
<input type="file" name="videos[]" id="videos" accept="video/*" multiple>
I have controller:
public function addVehicle(VehicleRequest $request, $category, $id)
{
dd($request);
}
And VehicleRequest with rules:
return [
'videos.*' => 'required|file|mimes:mp4,mov,og,wmv,flv,avi',
];
If file type is wrong, it fails validation, if lefty empty it passes, why is this happening??
and add a rule for videos too
'videos' => 'required',
'videos.*' => 'required|file|mimes:mp4,mov,og,wmv,flv,avi',
Please or to participate in this conversation.