I want to validate a file input
but the validation does not work it always return The given data was invalid.
even if the file given meets the validation requirements knowing that I'm uploading multiple files at once:
Here's the validation I use :
Validator::make($request->all('files'), [
'files' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048'
])->validate();
And here's the HTML I use :
<input type="file" id="files" ref="files" multiple v-on:change="uoloadFiles()" name="files"/>
Knowing that I use vue to handle the form submission.
Thanks for helping