pi-validator

1.1.0 • Public • Published

NPM version Build Status Coverage Status Dependency Status

PiValidator

Abstraction for validators inheritance. Validators are used to validate any data format. This interface allows common use for validation.

The basic implementation of it is pi-validator-tv4 (on progress) that validates an Object over a JSON schema.

But validator can be as complex as you wish. You can call remote endpoints to validate your entries. The only current restrictions is that the validation must be synchronous for now.

Install

npm install pi-validator

Usage

var PiValidator = require('pi-validator');
 
class CustomValidator extends Validator {
  validate() {
    // Your custom validation
  }
}

Package Sidebar

Install

npm i pi-validator

Weekly Downloads

2

Version

1.1.0

License

MIT

Last publish

Collaborators

  • juaniyyoo