|
OpenQuizz
Une application de gestion des contenus pédagogiques
|


Public Member Functions | |
| def | __init__ (self, typing.Union[str, typing.List, typing.Dict] message, str field_name=SCHEMA, typing.Optional[typing.Union[typing.Mapping[str, typing.Any], typing.Iterable[typing.Mapping[str, typing.Any]],]] data=None, typing.Optional[typing.Union[typing.List[typing.Dict[str, typing.Any]], typing.Dict[str, typing.Any],]] valid_data=None, **kwargs) |
| def | normalized_messages (self) |
Data Fields | |
| messages | |
| field_name | |
| data | |
| valid_data | |
| kwargs | |
Raised when validation fails on a field or schema.
Validators and custom fields should raise this exception.
:param message: An error message, list of error messages, or dict of
error messages. If a dict, the keys are subitems and the values are error messages.
:param field_name: Field name to store the error on.
If `None`, the error is stored as schema-level error.
:param data: Raw input data.
:param valid_data: Valid (de)serialized data.
| def __init__ | ( | self, | |
| typing.Union[str, typing.List, typing.Dict] | message, | ||
| str | field_name = SCHEMA, |
||
| typing.Optional[ typing.Union[ typing.Mapping[str, typing.Any], typing.Iterable[typing.Mapping[str, typing.Any]], ] ] | data = None, |
||
| typing.Optional[ typing.Union[ typing.List[typing.Dict[str, typing.Any]], typing.Dict[str, typing.Any], ] ] | valid_data = None, |
||
| ** | kwargs | ||
| ) |
Raised when validation fails on a field or schema. Validators and custom fields should raise this exception. :param message: An error message, list of error messages, or dict of error messages. If a dict, the keys are subitems and the values are error messages. :param field_name: Field name to store the error on. If `None`, the error is stored as schema-level error. :param data: Raw input data. :param valid_data: Valid (de)serialized data.
| def normalized_messages | ( | self | ) |
| data |
| field_name |
| kwargs |
| messages |
| valid_data |