Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect validation on uploaded file #134

Open
indapublic opened this issue Feb 5, 2021 · 3 comments
Open

Incorrect validation on uploaded file #134

indapublic opened this issue Feb 5, 2021 · 3 comments

Comments

@indapublic
Copy link

image

@danFWD
Copy link

danFWD commented Mar 16, 2021

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.

@dave-redfern
Copy link

@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.

@indapublic
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants