vtypes

1.0.0 • Public • Published

vtypes

Additional validation rules / contraints for validate.js to address other common data patterns

npm package Build Status Coverage Status vtypes

About

vtypes is built on top of validate.js, providing additional validation rules for certain data patterns / data types.

See the package repository for more details.

Build Formats

i.e.

# install validate.js 
$ npm install validate.js
 
# and install one of the following: 
$ npm install vtypes
$ npm install vtypes-register
$ npm install vtypes-* # where * corresponds to a validator type 

Usage

// export of all vtype validators without registering
const vtypes = require('vtypes');
const validate = require('validate.js');
 
// you can then proceed to register the required validators.
validate.validators.array = vtypes.array;
 
// or everything
validate.extend(validate.validators, vtypes);
 
// start using the validators

Alternatively, using vtypes-register:

//  import the register file to include all available validators.
require('vtypes-register')();
const validate = require('validate.js');
 
// start using the validators

Validators

For the most updated validators and their information, please see the package repository for more details.

License

vtypes is MIT licensed

/vtypes/

    Package Sidebar

    Install

    npm i vtypes

    Weekly Downloads

    2

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • geraldyeo