UNPKG

async-validate

Version:

Asynchronous validation for node and the browser

18 lines (15 loc) 268 B
module.exports = function() { /** * Validates a number. * * @param cb The callback function. */ this.main.number = function number(cb) { if(this.validates()) { this.required(); this.type(); this.range(); } cb(); } }