0.0.22 • Published 9 years ago

piggy-proof v0.0.22

Weekly downloads
2
License
MIT
Repository
-
Last release
9 years ago

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 = require('piggy-proof');

var data = {
  username: '',
  password: 'ab'
};

var validationResults = PiggyProof.validate(data, 'users');
// => {
//   username: [ 'is not present' ],
//   password: [ 'is below the minimum length' ]
// }

PiggyProof.isValid(validationResults)
// => false

Running Tests

npm test
0.0.22

9 years ago

0.0.21

9 years ago

0.0.20

9 years ago

0.0.19

9 years ago

0.0.18

9 years ago

0.0.17

9 years ago

0.0.16

9 years ago

0.0.15

9 years ago

0.0.14

9 years ago

0.0.13

9 years ago

0.0.12

9 years ago

0.0.11

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago