Laravel / July 10, 2014

Laravel inspired – validatorjs

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(); // true
validation.fails(); // false

Laravel News Partners

Newsletter

Join the weekly newsletter and never miss out on new tips, tutorials, and more.