validation icon indicating copy to clipboard operation
validation copied to clipboard

Incorrect validation on uploaded file

Open indapublic opened this issue 4 years ago • 3 comments

image

indapublic avatar Feb 05 '21 14:02 indapublic

I believe you will need to write a mutator or custom validator, since the actual type of the file being validated in this example is "Symfony...\UploadedFile" and not a native PHP $_FILE.

danFWD avatar Mar 16 '21 18:03 danFWD

@indapublic I ran into this and implemented my own (https://github.com/somnambulist-tech/form-request-bundle/blob/main/src/Rules/UploadedFileRule.php), though it also required overriding the RequiredRule as well.

dave-redfern avatar Mar 19 '21 20:03 dave-redfern

@dave-redfern Awesome! And thanks for your bundle :)

indapublic avatar Mar 19 '21 23:03 indapublic