readme.md 852 Bytes
Newer Older
Jaap Karan Singh's avatar
Jaap Karan Singh committed
1 2 3 4 5 6
JSON Schema Validator
=====================

jsonschema validator with custom types and attributes


7 8 9
Usage
-----

Jaap Karan Singh's avatar
Jaap Karan Singh committed
10 11
### Installation

12 13
```bash
$ npm install --save git+ssh://git@gitlab.com:jksdua__common/jsonschema-validator.git#v0.1.1
Jaap Karan Singh's avatar
Jaap Karan Singh committed
14 15
```

16
```js
Jaap Karan Singh's avatar
Jaap Karan Singh committed
17
var validator = require('js_jsonschema-validator').validator;
18 19 20 21 22 23 24 25 26 27 28 29

// regexp
validator.validate(/abc/, { type: 'regexp' });

// error
validator.validate(new Error(), { type: 'error' });

// objectid
validator.validate('123456789012345678901234', { type: 'objectId' });
```


Jaap Karan Singh's avatar
Jaap Karan Singh committed
30 31 32
Changelog
---------

33 34 35 36
### v0.1.1 (17 July 2014)
- Added `speed` type
- Fixed bug where custom types were not getting picked up

Jaap Karan Singh's avatar
Jaap Karan Singh committed
37
### v0.1.0 (24 June 2014)
Jaap Karan Singh's avatar
Jaap Karan Singh committed
38 39
- Changed namespace to `js` from `ht`

Jaap Karan Singh's avatar
Jaap Karan Singh committed
40
### v0.0.2 (24 June 2014)
41 42 43 44
- Removed dependency on `mongoskin`
- Added some tests
- Removed shrinkwrap

Jaap Karan Singh's avatar
Jaap Karan Singh committed
45
### v0.0.1 (24 June 2014)
Jaap Karan Singh's avatar
Jaap Karan Singh committed
46
- Initial commit