-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
A bundle of tweaks and fixes #30
Conversation
Will work against Visa, MasterCard, American Express, Discover, Diners Club, and JCB card numbering formats.
Will work against Visa, MasterCard, American Express, Discover, Diners Club, and JCB card numbering formats.
…prototype, making them compile when the module loads rather than each time a validation function is called.Trivial clean up on in and notIn
…d up the date validation methods.
Has this project been deserted? |
@tommedema no, but providing free support to open source projects comes after my day job and all of my other work |
@severeon thanks for this. Any reason validator.js and validator-min.js were removed in this commit? They were separate versions for the browser |
These changes are exactly what I need and I'd rather not do it all myself if this commit is ok. What's the word here? |
That's @severeon. I did not remove the minified version; just added the validations. Pick out my commit if you just need the validations. |
While I was waiting for an answer I merged a similar pull request => #57 |
Pulled out all the regexs and put them in Validator.prototype - allowing people to access them directly if they want, and causing them to compile only once rather than every time a validation method is used.
Added 'setMessage' to let you change your error message in the middle of a validation chain.
Optimized 'isInt' and 'isDecimal' using modulo rather than a regex.
Fixed an issue with 'isUUID' where 'pattern' was being used as a global variable rather than local.
Simplified 'isIP', 'isAfter', and 'isBefore'