Validator adapter interface for node-document ODM for Node.js.
Unified interface for validating data based on a custom JSON Schema.
-
(data, schema, [callback(err, res)])
validator.validate({foo: 'bar'}, {foo: {type: 'string', required: true}}, function(err, res) { // console.log(arguments); });
$ npm install node-document-validator
For details; see node-document.
Local tests:
$ make test
Released under the MIT license.
Copyright (c) Jonas Grimfelt