Open thatside-zaraffa opened 6 years ago
That's correct, it is listed as an TODO in the roadmap in the readme.
It is optional. However I plan to support it. PR's are welcome though.
Implementations MAY support the "format" keyword as a validation assertion. Should they choose to do so:
they SHOULD implement validation for attributes defined below; they SHOULD offer an option to disable validation for this keyword. Implementations MAY add custom format attributes. Save for agreement between parties, schema authors SHALL NOT expect a peer implementation to support this keyword and/or custom format attributes.
I will try to add this if I'll have enough time. An idea to consider: maybe this library could use AJV under the hood? This is a great change but the main win from this decision would be the speed of implementation of new JSON Schema drafts because AJV author participates a lot in JSON Schema development process.
And a little off-topic issue: it seems that schemaRequired => noParamsRequired validator doesn't work like in Vuelidate (code here: https://github.com/monterail/vuelidate/blob/master/src/validators/common.js#L5).
+1 for ajv - it's the fastest JSON schema validator out there. Why not take advantage of that?
Another thing not supported is $data
refs. Very useful for password confirmations to compare two passwords.
ajv
supports this natively.
Validation like:
won't work as expected. See http://json-schema.org/latest/json-schema-validation.html#rfc.section.7 for list of currently supported formats and http://json-schema.org/draft-07/json-schema-release-notes.html#formats for those which were added in draft 7.