I am applying laravel validation for multiple image it works for single iamge upload but can not works for multiple what is mistake done by me?
$this->validate($request, array(
'imagenew.*' => 'required|mimetypes:image/jpeg,image/png,image/jpg',
'image'=>'required|mimes:jpeg,png,jpg',
));
Blade :
<div class="col-sm-4">
<label for="image" class=" form-control-label">Property Single Image</label>
<input type="file" id="image" name="image" class="form-control-file">
<span class="text-danger" required>{{ $errors->first('image') }}</span>
</div>
<div class="col-sm-4">
<label for="imagenew" class=" form-control-label">Property Multiple Image</label>
<input type="file" id="imagenew" name="imagenew[]" class="form-control-file" multiple>
<span class="text-danger" required>{{ $errors->first('imagenew') }}</span>
</div>
question from:
https://stackoverflow.com/questions/66058214/multiple-image-validation-in-laravel 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…