grimen / node-document-validator

Validator adapter interface for `node-document` ODM for Node.js.

Home Page:https://npmjs.org/package/node-document-validator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NODE-DOCUMENT-VALIDATOR Build Status

Validator adapter interface for node-document ODM for Node.js.

About

Unified interface for validating data based on a custom JSON Schema.

Adapters

API

#validate

  • (data, schema, [callback(err, res)])

    validator.validate({foo: 'bar'}, {foo: {type: 'string', required: true}}, function(err, res) {
      // console.log(arguments);
    });

Installation

  $ npm install node-document-validator

Usage

For details; see node-document.

Test

Local tests:

  $ make test

License

Released under the MIT license.

Copyright (c) Jonas Grimfelt

Bitdeli Badge

About

Validator adapter interface for `node-document` ODM for Node.js.

https://npmjs.org/package/node-document-validator

License:MIT License


Languages

Language:JavaScript 100.0%