A validation schema.
The schema is a Python tree-like structure where nodes are pattern matched against corresponding trees of values.
Nodes can be values, in which case a direct comparison is used, types, in which case an isinstance() check is performed, or callables, which will validate and optionally convert the value.
Create a new Schema.
| Parameters: |
|
|---|
Validate data against self.schema. This simply is a shortcut for validate method.
| Parameters: | data – input data to validate |
|---|---|
| Returns: | validated input |
| Raise : | InvalidList |