Allow arbitrary types in model (#209)

* Allow arbitrary types in model

* Replaced ConfigError with RuntimeError

* Corrections of the ArbitraryTypeError exception class
This commit is contained in:
Evghenii Goncearov
2018-07-02 14:08:43 +03:00
committed by Samuel Colvin
parent 8f42e515d5
commit 73015d2a72
6 changed files with 73 additions and 10 deletions
+2
View File
@@ -345,6 +345,8 @@ Options:
``False``)
:error_msg_templates: let's you to override default error message templates.
Pass in a dictionary with keys matching the error messages you want to override (default: ``{}``)
:arbitrary_types_allowed: whether to allow arbitrary user types for fields (they are validated simply by checking if the
value is instance of that type). If False - RuntimeError will be raised on model declaration (default: ``False``)
.. warning::