So you get an error message if the 'required' validation fails, but no error message if the 'image' validation fails?
Have you tried inspecting the $errors variable?
Hi,
I am trying to get validation working on an array of images.
I have an input:
{!! Form::file('images[]', ['multiple' => 'multiple']) !!}
And a Form Request with the following rules:
public function rules()
{
$rules = [
'images.*' => ['required', 'image'],
];
return $rules;
}
The above 'required' check works perfectly and forces the user to upload at least one image as expected.
However the 'image' check seems to work in that it won't let me upload a txt file, however it doesn't throw out any message on failed validation.
Does anyone have an idea what may be happening?
Thanks in advance.
Ralph
Please or to participate in this conversation.