Answer the question
In order to leave comments, you need to log in
Why doesn't image validation work?
$this->validate($request, [
'description' => 'required|min:20|max:3000',
'images' => 'mimes:png',
]);
<div class="form-group">
<label for="images">Скриншоты</label>
<input type="file" multiple class="form-control-file {{($errors->has('images') ? 'error-border' : '')}}" name="images[]" id="images">
@if ($errors->has('images'))
<span class="help-block text-danger">
<strong>{{ $errors->first('images') }}</strong>
</span>
@endif
</div>
Answer the question
In order to leave comments, you need to log in
You have an array and it is not a picture,
you need to check the array element
$this->validate($request, [
'description' => 'required|min:20|max:3000',
'images.*' => 'mimes:png',
]);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question