trailpack-express-validator
Trailpack validation for Trails application using express validator
Usage
npm install --save trailpack-express-validator
// api/validators/SomeValidator.js ; { return body: firstName: notEmpty: true lastName: notEmpty: true email: isEmail: true username: notEmpty: true password: notEmpty: true ; } { return body: email: isEmail: true password: notEmpty: true ; }
// config/validators.js UserController: register: 'UserValidator.register' login: 'UserValidator.login' ;