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


Public Member Functions | |
| def | __init__ (self, min=None, max=None, *bool min_inclusive=True, bool max_inclusive=True, typing.Optional[str] error=None) |
| _T | __call__ (self, _T value) |
Public Member Functions inherited from Validator | |
| str | __repr__ (self) |
| typing.Any | __call__ (self, typing.Any value) |
Data Fields | |
| min | |
| max | |
| error | |
| min_inclusive | |
| max_inclusive | |
Static Public Attributes | |
| message_min | |
| message_max | |
| message_all | |
| message_gte | |
| message_gt | |
| message_lte | |
| message_lt | |
Static Public Attributes inherited from Validator | |
| error | |
Validator which succeeds if the value passed to it is within the specified
range. If ``min`` is not specified, or is specified as `None`,
no lower bound exists. If ``max`` is not specified, or is specified as `None`,
no upper bound exists. The inclusivity of the bounds (if they exist) is configurable.
If ``min_inclusive`` is not specified, or is specified as `True`, then
the ``min`` bound is included in the range. If ``max_inclusive`` is not specified,
or is specified as `True`, then the ``max`` bound is included in the range.
:param min: The minimum value (lower bound). If not provided, minimum
value will not be checked.
:param max: The maximum value (upper bound). If not provided, maximum
value will not be checked.
:param min_inclusive: Whether the `min` bound is included in the range.
:param max_inclusive: Whether the `max` bound is included in the range.
:param error: Error message to raise in case of a validation error.
Can be interpolated with `{input}`, `{min}` and `{max}`.
| def __init__ | ( | self, | |
min = None, |
|||
max = None, |
|||
| *bool | min_inclusive = True, |
||
| bool | max_inclusive = True, |
||
| typing.Optional[str] | error = None |
||
| ) |
| _T __call__ | ( | self, | |
| _T | value | ||
| ) |
| error |
| max |
| max_inclusive |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| min |
| min_inclusive |