UNPKG

1.6 kBMarkdownView Raw
1# Good Eggs JSON Schema Validator
2
3[![build status][travis-badge]][travis-link]
4[![npm version][npm-badge]][npm-link]
5[![MIT license][license-badge]][license-link]
6[![we're hiring][hiring-badge]][hiring-link]
7
8```
9npm install goodeggs-json-schema-validator
10```
11
12Common JSON schema and [tv4](https://github.com/geraintluff/tv4) add-ons for Good Eggs ecosystem.
13
14## Common schema add-ons
15
16Adds support for these formats:
17
18- objectid
19- date (YYYY-MM-DD)
20- date-time (for example, 2014-05-02T12:59:29+00:00)
21- time (HH:mm or HH:mm:ss, e.g. 23:04:20)
22- email
23
24Simply include the format in your schema:
25
26```json
27{"type": "string", "format": "date"}
28```
29
30## Contributing
31
32Please follow our [Code of Conduct](https://github.com/goodeggs/goodeggs-json-schema-validator/blob/master/CODE_OF_CONDUCT.md)
33when contributing to this project.
34
35```
36$ git clone https://github.com/goodeggs/goodeggs-json-schema-validator && cd goodeggs-json-schema-validator
37$ npm install
38$ npm test
39```
40
41[travis-badge]: http://img.shields.io/travis/goodeggs/goodeggs-json-schema-validator.svg?style=flat-square
42[travis-link]: https://travis-ci.org/goodeggs/goodeggs-json-schema-validator
43[npm-badge]: http://img.shields.io/npm/v/goodeggs-json-schema-validator.svg?style=flat-square
44[npm-link]: https://www.npmjs.org/package/goodeggs-json-schema-validator
45[license-badge]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square
46[license-link]: LICENSE.md
47[hiring-badge]: https://img.shields.io/badge/we're_hiring-yes-brightgreen.svg?style=flat-square
48[hiring-link]: http://goodeggs.jobscore.com/?detail=Open+Source&sid=161