vtypes
Additional validation rules / contraints for validate.js to address other common data patterns
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 registeringconst vtypes = ;const validate = ; // you can then proceed to register the required validators.validatevalidatorsarray = vtypesarray; // or everythingvalidate; // start using the validators
Alternatively, using vtypes-register
:
// import the register file to include all available validators.;const validate = ; // start using the validators
Validators
For the most updated validators and their information, please see the package repository for more details.
- arrayOf
- array
- bool
- different
- func
- immutable
- invariant
- json
- objectOf
- only
- requiredIf
- requiredUnless
- requiredWithAll
- requiredWith
- requiredWithoutAll
- requiredWithout
- shape
- size
- string
License
vtypes
is MIT licensed