piggy-proof
Validation library for PiggyPot. Validation rules are held in a central 'models' directory - this reduces duplication of rules across the codebase.
Installation
npm install --save piggy-proof
Usage
var PiggyProof = ; var data = username: '' password: 'ab'; var validationResults = PiggyProof;// => {// username: [ 'is not present' ],// password: [ 'is below the minimum length' ]// } PiggyProof// => false
Running Tests
npm test