tv4
tv4 copied to clipboard
Tiny Validator for JSON Schema v4
See [this StackOverflow question](https://stackoverflow.com/questions/30868023/json-schema-require-all-properties) lamenting the repetitiveness of the `required` key in schemas like: ``` "type": "object", "properties": { "foo": { "type": "string" }, "bar": { "type": "string" }, "baz":...
Reimplemented trimming trailing whitespace
@geraintluff, introduced a custom format to accept null or any accepted data type as input value. But somewhere in the tv4 code the null check is being executed even before...
Hey there! I'd like to report a security issue but cannot find contact instructions on your repository. If not a hassle, might you kindly add a `SECURITY.md` file with an...
Please let me know what below code is doing? // Grungey Object.isFrozen hack if (!Object.isFrozen) { Object.isFrozen = function (obj) { var key = "tv4_test_frozen_key"; while (obj.hasOwnProperty(key)) { key +=...
tv4.validate does not tell the difference when using 'const' schema property ``` const jsonData = { "id": 1160134, "lastUpdatedBy": "API_TEST" } const schema = { "required": [ "id", "lastUpdatedBy", ],...
Just saw the addition of this property within my original object after going through tv4 validation .. Is this intentional ? If so why ?
- Earlier it was JSON.stringify(data) which was giving unnecessary "inverted commas(" ")". - And generally, we use "!==" operator,
[Documentation](https://github.com/geraintluff/tv4#usage-1-simple-validation) mentions: > The "code" property will refer to one of the values in tv4.errorCodes - in this case, tv4.errorCodes.INVALID_TYPE. I've been trying to find what values appear in `tv4.errorCodes`...
Are there any plans to support new draft json schema version?