How to use the prototype function from validator
Find comprehensive JavaScript validator.prototype code examples handpicked from public code repositorys.
GitHub: kissjs/connect-iform
![kissjs profile picture](/kissjs.png?size=40)
25 26 27 28 29 30 31 32 33 34
* birth : Date * }); * * 2. type * * all the type is define in node-validator, Validator.prototype.is* * * there are isDate, isEmail, isCreditCard, isUrl, etc * * you can use capitalised string or lowercase string. e.g. 'date', 'Email', 'CreditCard', 'url'
GitHub: sogoiii/showoffWork
8 9 10 11 12 13 14 15 16 17
var jade = require('jade'); var fs = require('fs'); var Validator = require('validator').Validator; var check = require('validator').check, sanitize = require('validator').sanitize Validator.prototype.error = function(msg) { this._errors.push(msg); return this; } Validator.prototype.getErrors = function() {
validator.escape is the most popular function in validator (548 examples)