-
Notifications
You must be signed in to change notification settings - Fork 148
Open
Description
hi,
I am trying to validate files in an array, for example my HTML looks like this:
<input type="file" name="name[0][avatar]">
<input type="file" name="name[1][avatar]">
<input type="file" name="name[2][avatar]">Note that the number of avatars is dynamic, the users can add as many avatars as the want.
I tried something like $validation = $validator->validate($_FILES, ['name.*.avatar' => 'required|uploaded_file|max:2M|mimes:jpeg,png']); but doesn't seem to work. Looks like if my file is in an array the way I display above, the uploaded_file validation doesn't seem to work, as if it cannot find the uploaded file.
Any ideas?
Note, i use Slim framework. At first i didnt think $_FILES worked with Slim, but it does.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels