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

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


## Installation

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


## Usage

**Basic:**

```javascript
  var Validator = require('node-document-validator-amanda');

  var validator = new Validator();

  var data = {
    foo: "foo",
    bar: 123,
    baz: undefined
  };

  var schema = {
    foo: {
      type: "string",
      minLength: 4
    },
    bar: {
      type: "number"
    },
    baz: {
      required: true
    }
  };

  validator.validate(data, schema, function(err, errors, valid) {
    console.log("Valid: %s  \nErrors:\n", valid, errors);
  });
```

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-AMANDA [![Build Status](https://secure.travis-ci.org/grimen/node-document-validator-amanda.png)](http://travis-ci.org/grimen/node-document-validator-amanda)

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


## Installation

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


## Usage

**Basic:**

```javascript
  var Validator = require('node-document-validator-amanda');

  var validator = new Validator();

  var data = {
    foo: "foo",
    bar: 123,
    baz: undefined
  };

  var schema = {
    foo: {
      type: "string",
      minLength: 4
    },
    bar: {
      type: "number"
    },
    baz: {
      required: true
    }
  };

  validator.validate(data, schema, function(err, errors, valid) {
    console.log("Valid: %s  \nErrors:\n", valid, errors);
  });
```

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-amanda/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
{'fraction_non_alphanumeric': 0.17896009673518742, 'fraction_numerical': 0.005239822652156389, 'mean_word_length': 3.432142857142857, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 10, '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': '2668071', 'n_tokens_mistral': 907, 'n_tokens_neox': 868, 'n_words': 162}