validate-json-schema-form
Validate a form using JSON Schema.
Installation
$ npm install validate-json-schema-form
Usage
const validator = const validate = const form = document
API
validate = validator(schema)
Create a form validator out of a JSON Schema.
validate(el, [opts], cb(err, data))
Validate a form element and call a callback with the results. Opts can contain the following values:
- [tbi]
partial=false
- set totrue
to only validate non-empty values. - [tbi]
formats
- define custom formats. - [tbi]
schemas
- reference external schemas.