tv4
tv4 copied to clipboard
Tiny Validator for JSON Schema v4
**Reference sample:** ``` "receiver": { "$ref": "#receiver" } ``` **Code sample:** `tv4.validateMultiple(data, schema);` **Result:** ``` error:null missing:[] ```
Say my response is a JSON array of objects: ``` { all_my_objects: [ { "id": 1 "name": "name" }, ... ] } ``` If I (incorrectly) build my schema like...
i have prop in schema ``` "^attr-dropdown[0-9]+$": { "type": "number" }, ``` and if in model i have {attr-dropdown0: 'some value'} var result = tv4.validateMultiple(target.model, target.schema); in result no errors.....
Hi In https://github.com/postmanlabs/postman-app-support/issues/3173, I reported an issue where tv4.validate was not reporting an anomaly that I purposefully introduced. As I'm brand-new to TV4, I'm not sure if I am 'the...
When I validate my schema it isn't failing when I put in different casing. **Schema:** ```json { "$schema": "http://json-schema.org/draft-04/schema#", "additionalProperties": false, "definitions": {}, "id": "http://example.com/example.json", "properties": { "clientCode": { "id":...
Hi, I'm trying to validate using $ref. At first, I had some external references and as seen in the documentation, it was returning true without validating. So I tried using...
On [the page for this package on npm](https://www.npmjs.com/package/tv4) it shows that the latest release is v1.3.0, but - the highest tag I can find here on Github is v1.2.7 -...
I'm not sure how many browsers you want to support, but there is code in there which calls Object.keys() and Array.isArray. You may want to include these polyfills for older...
Why is the `.min.js` in the ignored section of `bower.json`? Seems like people bower installing this project are exactly the people that would want a minified version. Thanks!
Given a schema like: ``` Tree: type: object required: - children properties: children: type: array items: $ref: '#/Tree' ``` The parser chokes, specifically being unable to `normalize` and `search` the...