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

trim, ltrim... sanitize methods + fix Extending docs #79

Merged
merged 4 commits into from
Mar 17, 2014

Conversation

bars3s
Copy link
Contributor

@bars3s bars3s commented Mar 15, 2014

Hi!
I hope they will be useful.

@@ -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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use strict inequality.

@ctavan
Copy link
Member

ctavan commented Mar 17, 2014

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

@bars3s
Copy link
Contributor Author

bars3s commented Mar 17, 2014

@ctavan I fixed it.

@ctavan
Copy link
Member

ctavan commented Mar 17, 2014

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.

ctavan added a commit that referenced this pull request Mar 17, 2014
trim, ltrim... sanitize methods + fix Extending docs
@ctavan ctavan merged commit 20532f1 into express-validator:master Mar 17, 2014
@ctavan
Copy link
Member

ctavan commented Mar 17, 2014

Published to npm as v2.1.1

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

None yet

2 participants