From e1f9ada6962198ec6d461ecf0b7da65412c22910 Mon Sep 17 00:00:00 2001 From: Ethan Date: Thu, 23 Sep 2021 21:56:00 -0700 Subject: [PATCH] doc README regarding validation --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 37b6d5867..86444d9d3 100644 --- a/README.md +++ b/README.md @@ -212,6 +212,15 @@ module ContactPhone end ``` +## Validation + +JSI implements all required features, and many optional features, for validation according to supported JSON Schema specifications. To validate instances, see methods {JSI::Base#jsi_validate}, {JSI::Base#jsi_valid?}, {JSI::Schema#validate_instance}, {JSI::Schema#instance_valid?}. + +The following optional features are not completely supported: + +- The `format` keyword does not perform any validation. +- Regular expressions are interpreted by Ruby's Regexp class, whereas JSON Schema recommends interpreting these as ECMA 262 regular expressions. Certain expressions behave differently, particularly `^` and `$`. + ## Metaschemas A metaschema is a schema which describes schemas. Likewise, a schema is an instance of a metaschema.