Cerberus v0.9 Release Notes
Release Date: 2015-06-24 // almost 9 years ago-
๐ Released on June 24 2015. Codename: 'Mastrolindo'.
- ๐ New: 'oneof' rule which provides a list of definitions in which only one should validate (C.D. Clark III).
- ๐ New: 'noneof' rule which provides a list of definitions that should all not validate (C.D. Clark III).
- ๐ New: 'anyof' rule accepts a list of definitions and checks that one definition validates (C.D. Clark III).
- ๐ New: 'allof' rule validates if if all definitions validate (C.D. Clark III).
- ๐ New: 'validator.validated' takes a document as argument and returns a validated document or 'None' if validation failed (Frank Sachsenheim).
- ๐ New: PyPy support (Frank Sachsenheim).
- ๐ New: Type coercion (Brett).
๐ New: Added 'propertyschema' validation rule (Frank Sachsenheim).
๐ Change: Use 'str.format' in error messages so if someone wants to override them does not get an exception if arguments are not passed. Closes :issue:
105
. (Brett)๐ Change: 'keyschema' renamed to 'valueschema', print a deprecation warning (Frank Sachsenheim).
๐ Change: 'type' can also be a list of types (Frank Sachsenheim).
๐ Fix: useages of 'document' to 'self.document' in '_validate' (Frank Sachsenheim).
๐ Fix: when 'items' is applied to a list, field name is used as key for 'validator.errors', and offending field indexes are used as keys for field errors ({'a_list_of_strings': {1: 'not a string'}}) 'type' can be a list of valid types.
๐ Fix: Ensure that additional
**kwargs
of a subclass persist through validation (Frank Sachsenheim).๐ Fix: improve failure message when testing against multiple types (Frank Sachsenheim).
๐ Fix: ignore 'keyschema' when not a mapping (Frank Sachsenheim).
๐ Fix: ignore 'schema' when not a sequence (Frank Sachsenheim).
๐ Fix: allow_unknown can also be set for nested dicts. Closes :issue:
75
. (Tobias Betz)๐ Fix: raise SchemaError when an unallowed 'type' is used in conjunction with 'schema' rule (Tobias Betz).
๐ Docs: added section that points out that YAML, JSON, etc. can be used to define schemas (C.D. Clark III).
๐ Docs: Improve 'allow_unknown' documentation (Frank Sachsenheim).