Collection validators
MustBeMemberOf(value_set, *, err_msg=None, extra_msg_args=None)
Bases: Validator
Validates that the value is a member of the specified set.
| PARAMETER | DESCRIPTION |
|---|---|
value_set
|
The set of values to validate against.
TYPE:
|
err_msg
|
Error message.
TYPE:
|
MustBeEmpty(*, err_msg=None, extra_msg_args=None)
Bases: Validator
| PARAMETER | DESCRIPTION |
|---|---|
err_msg
|
Error message.
TYPE:
|
MustBeNonEmpty(*, err_msg=None, extra_msg_args=None)
Bases: Validator
| PARAMETER | DESCRIPTION |
|---|---|
err_msg
|
Error message.
TYPE:
|
MustHaveLengthEqual(value, *, err_msg=None, extra_msg_args=None)
Bases: Validator
Validates that the iterable has length equal to the specified value.
| PARAMETER | DESCRIPTION |
|---|---|
value
|
The length of the iterable.
TYPE:
|
err_msg
|
Error message.
TYPE:
|
MustHaveLengthGreaterThan(value, *, err_msg=None, extra_msg_args=None)
Bases: Validator
Validates that the iterable has length greater than the specified value.
| PARAMETER | DESCRIPTION |
|---|---|
value
|
The length of the iterable.
TYPE:
|
err_msg
|
Error message.
TYPE:
|
MustHaveLengthGreaterThanOrEqual(value, *, err_msg=None, extra_msg_args=None)
Bases: Validator
Validates that the iterable has length greater than or equal to the specified value.
| PARAMETER | DESCRIPTION |
|---|---|
value
|
The length of the iterable.
TYPE:
|
err_msg
|
Error message
TYPE:
|
MustHaveLengthLessThan(value, *, err_msg=None, extra_msg_args=None)
Bases: Validator
Validates that the iterable has length less than the specified value.
| PARAMETER | DESCRIPTION |
|---|---|
value
|
The length of the iterable.
TYPE:
|
err_msg
|
Error message.
TYPE:
|
MustHaveLengthLessThanOrEqual(value, *, err_msg=None, extra_msg_args=None)
Bases: Validator
Validates that the iterable has length less than or equal to the specified value.
| PARAMETER | DESCRIPTION |
|---|---|
value
|
The length of the iterable.
TYPE:
|
err_msg
|
Error message.
TYPE:
|
MustHaveLengthBetween(*, min_value, max_value, min_inclusive=True, max_inclusive=True, err_msg=None, extra_msg_args=None)
Bases: Validator
Validates that the iterable has length between the specified min_value and max_value.
| PARAMETER | DESCRIPTION |
|---|---|
min_value
|
The minimum value (inclusive or exclusive based on min_inclusive).
TYPE:
|
max_value
|
The maximum value (inclusive or exclusive based on max_inclusive).
TYPE:
|
min_inclusive
|
If True, min_value is inclusive.
TYPE:
|
max_inclusive
|
If True, max_value is inclusive.
TYPE:
|
err_msg
|
error message.
TYPE:
|
MustHaveValuesGreaterThan(min_value, *, err_msg=None, extra_msg_args=None)
Bases: Validator
Validates that all values in the iterable are greater than the specified min_value.
| PARAMETER | DESCRIPTION |
|---|---|
min_value
|
The minimum value the values in the iterable should be greater than.
TYPE:
|
err_msg
|
Error message.
TYPE:
|
MustHaveValuesGreaterThanOrEqual(min_value, *, err_msg=None, extra_msg_args=None)
Bases: Validator
Validates that all values in the iterable are greater than or equal to the specified min_value.
| PARAMETER | DESCRIPTION |
|---|---|
min_value
|
The minimum value the values in the iterable should be greater than or equal to.
TYPE:
|
err_msg
|
Error message.
TYPE:
|
MustHaveValuesLessThan(max_value, *, err_msg=None, extra_msg_args=None)
Bases: Validator
Validates that all values in the iterable are less than the specified max_value.
| PARAMETER | DESCRIPTION |
|---|---|
max_value
|
The maximum value the values in the iterable should be less than.
TYPE:
|
err_msg
|
Error message.
TYPE:
|
MustHaveValuesLessThanOrEqual(max_value, *, err_msg=None, extra_msg_args=None)
Bases: Validator
Validates that all values in the iterable are less than or equal to the specified max_value.
| PARAMETER | DESCRIPTION |
|---|---|
max_value
|
The maximum value the values in the iterable should be less than or equal to.
TYPE:
|
err_msg
|
Error message.
TYPE:
|
MustHaveValuesBetween(*, min_value, max_value, min_inclusive=True, max_inclusive=True, err_msg=None, extra_msg_args=None)
Bases: Validator
Validates that all values in the iterable are between the specified min_value and max_value.
| PARAMETER | DESCRIPTION |
|---|---|
min_value
|
The minimum value (inclusive or exclusive based on min_inclusive).
TYPE:
|
max_value
|
The maximum value (inclusive or exclusive based on max_inclusive).
TYPE:
|
min_inclusive
|
If True, min_value is inclusive.
TYPE:
|
max_inclusive
|
If True, max_value is inclusive.
TYPE:
|
err_msg
|
error message.
TYPE:
|