diff --git a/docs/validate.rst b/docs/validate.rst index 50b7456..b63bd98 100644 --- a/docs/validate.rst +++ b/docs/validate.rst @@ -14,6 +14,9 @@ The simplest way to validate an instance under a given schema is to use the .. autofunction:: validate +To learn more about creating json schema to validate your data, see +`Understanding JSON Schema `_ + The Validator Interface ----------------------- @@ -181,6 +184,26 @@ implements. .. autoclass:: Draft4Validator +For example, if you wanted to validate a schema you created against the Draft 3 +json schema, you could use: + +.. code-block:: python + + + from jsonschema import Draft4Validator + + schema = { + "$schema": "http://json-schema.org/schema#" + + "type": "object", + "properties": { + "name": {"type": "string"}, + "email": {"type": "string"}, + } + "required": ["email"], + } + Draft4Validator.check_schema(schema) + Validating Formats ------------------