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

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago