Laravel inspired – validatorjs
Published on by Eric L. Barnes
A JavaScript validator for both node and the client. Inspired by the Laravel PHP framework’s Validator class.
Example Usage:
var data = { name: 'David', email: 'david@gmail.com', age: 28}; var rules = { name: 'required', email: 'required|email', age: 'min:18'}; var validation = new Validator(data, rules); validation.passes(); // truevalidation.fails(); // false
Eric is the creator of Laravel News and has been covering Laravel since 2012.