-
-
Notifications
You must be signed in to change notification settings - Fork 616
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
trim, ltrim... sanitize methods + fix Extending docs #79
Conversation
@@ -42,7 +42,7 @@ var expressValidator = function(options) { | |||
var methods = {}; | |||
|
|||
Object.keys(validator).forEach(function(methodName) { | |||
if (methodName.match(/^to/) || methodName in sanitizers) { | |||
if (methodName.match(/^to/) || sanitizers.indexOf(methodName) != -1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use strict inequality.
@bars3s Thanks a lot for your patch! I had two little comments and it would be great if you could address them. I'm happy to merge the Pullrequest as soon as the two comments are fixed. |
@ctavan I fixed it. |
Great! I'll merge it. Just another idea: It would of course be awesome to have some test coverage for this bug so it won't happen again in the future. I'd be super happy to merge such an addition to the test suite as well. |
trim, ltrim... sanitize methods + fix Extending docs
Published to npm as v2.1.1 |
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. |
Hi!
I hope they will be useful.