<commit_before># NODE-DOCUMENT-VALIDATOR [![Build Status](https://secure.travis-ci.org/grimen/node-document-validator.png)](http://travis-ci.org/grimen/node-document-validator)

**Validator** adapter interface for [node-document](https://github.com/grimen/node-document) ODM for Node.js.

## About

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


## Adapters

* [Amanda](https://github.com/grimen/node-document-validator-amanda)
* [Schema.js](https://github.com/grimen/node-document-validator-schema)
* [JSONGate](https://github.com/grimen/node-document-validator-jsongate)
* [JSONSchema](https://github.com/grimen/node-document-validator-jsonschema)
* [JSV](https://github.com/grimen/node-document-validator-jsv)


## API

### `#validate`

* `(data, schema, [callback(err, res)])`

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


## Installation

```shell
  $ npm install node-document-validator
```


## Usage

For details; see [node-document](https://github.com/grimen/node-document).


## Test

**Local tests:**

```shell
  $ make test
```


## License

Released under the MIT license.

Copyright (c) [<NAME>](http://github.com/grimen)<commit_msg>Add a Bitdeli Badge to README<commit_after># NODE-DOCUMENT-VALIDATOR [![Build Status](https://secure.travis-ci.org/grimen/node-document-validator.png)](http://travis-ci.org/grimen/node-document-validator)

**Validator** adapter interface for [node-document](https://github.com/grimen/node-document) ODM for Node.js.

## About

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


## Adapters

* [Amanda](https://github.com/grimen/node-document-validator-amanda)
* [Schema.js](https://github.com/grimen/node-document-validator-schema)
* [JSONGate](https://github.com/grimen/node-document-validator-jsongate)
* [JSONSchema](https://github.com/grimen/node-document-validator-jsonschema)
* [JSV](https://github.com/grimen/node-document-validator-jsv)


## API

### `#validate`

* `(data, schema, [callback(err, res)])`

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


## Installation

```shell
  $ npm install node-document-validator
```


## Usage

For details; see [node-document](https://github.com/grimen/node-document).


## Test

**Local tests:**

```shell
  $ make test
```


## License

Released under the MIT license.

Copyright (c) [<NAME>](http://github.com/grimen)

[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/grimen/node-document-validator/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
{'fraction_non_alphanumeric': 0.18754552075746542, 'fraction_numerical': 0.001820830298616169, 'mean_word_length': 4.572008113590264, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 18, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2417220', 'n_tokens_mistral': 954, 'n_tokens_neox': 941, 'n_words': 152}