Validator.js: the almost missing javascript validator for Node and the browser
1–6 of 6 posts
Re: Validator.js: the almost missing javascript validator for Node and the browser
#2Source: https://github.com/guillaumepotier/validator.js/blob/master/...
http://davidcel.is/blog/2012/09/06/stop-validating-email-add... http://stackoverflow.com/a/202528/744180 (others, just Google)
Re: Validator.js: the almost missing javascript validator for Node and the browser
#3It validates emails with a regex. I'm not sure how many times it's been discussed that you shouldn't validate emails with a regex, but please stop validating emails with a regex. Source: https://github.com/guillaumepotier/validator.js/blob/master/... http://davidcel.is/blog/2012/09/06/stop-validating-email-add... http://stackoverflow.com/a/202528/744180 (others, just Google)
Re: Validator.js: the almost missing javascript validator for Node and the browser
#4It validates emails with a regex. I'm not sure how many times it's been discussed that you shouldn't validate emails with a regex, but please stop validating emails with a regex. Source: https://github.com/guillaumepotier/validator.js/blob/master/... http://davidcel.is/blog/2012/09/06/stop-validating-email-add... http://stackoverflow.com/a/202528/744180 (others, just Google)
Maybe we can find a better simple solution they can use? If they don't have that feature many people will be frustrated.
Just as a reminder, if you are sending email verifications out anyway, there is no point in validating email addresses manually.
Re: Validator.js: the almost missing javascript validator for Node and the browser
#5It validates emails with a regex. I'm not sure how many times it's been discussed that you shouldn't validate emails with a regex, but please stop validating emails with a regex. Source: https://github.com/guillaumepotier/validator.js/blob/master/... http://davidcel.is/blog/2012/09/06/stop-validating-email-add... http://stackoverflow.com/a/202528/744180 (others, just Google)
Right. But not including it will inexorably lead to new Issue or PR to add it. Not sure it is validatorjs's role to educate users in their validation, just providing best as possible tools to do it right, no ?
Certainly when it comes to security, authors should do their best to ensure users of the tool are educated, when there's a security issue with any large software product, particularly open source, that's mostly down to poor configuration or ill-informed users, the authors are instantly criticized, but I think it should be the same for any general features in a tool that targets a specific functionality. This particular "best practice" is quite easy to find, and the tool is very specifically targeted towards validation, yet has something that's against best practice and could potentially cause frustration for people who use this tool, and people who use the stuff created using this tool.
Re: Validator.js: the almost missing javascript validator for Node and the browser
#6If somebody is interested in the code, you can have a look at the github project.