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

Add a check if req.files array is not undefined before accessing it #91

Merged
merged 1 commit into from
Jun 3, 2014

Conversation

antoineverger
Copy link

No description provided.

@antoineverger antoineverger mentioned this pull request Jun 3, 2014
ctavan added a commit that referenced this pull request Jun 3, 2014
Add a check if req.files array is not undefined before accessing it
@ctavan ctavan merged commit 33009ff into express-validator:master Jun 3, 2014
@antoineverger
Copy link
Author

Thanks !

@antoineverger
Copy link
Author

Actually, it does not solve all problems. I implemented a fix and I'm working on a test case for checkFiles.

@antoineverger
Copy link
Author

@ctavan , after investigating, I'm not even sure to have a checkFiles in this library since you can not use as many validators as you would do for params or body. I would actually recommend to get rid of the possibility to checkFiles from the library until a nicer approach is developed. What do you think about it ?

@ctavan
Copy link
Member

ctavan commented Jun 4, 2014

@antoineverger Since I currently have no real usecase for this feature I don't really have a strong opinion. But it seems like there are other people looking for this as well, so maybe you wanna discuss that in #71 ?

@lock
Copy link

lock bot commented May 31, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants