h2integrate.core.validators#
This module contains validator functions for use with attrs class definitions.
Functions
|
Validates that an item is part of a given list. |
|
Validates that an attribute's value is greater than zero. |
|
Validates that an attribute's value is greater than or equal to zero. |
|
Validates that an item equals a specific value |
|
Validates that an attribute's value is between two values, inclusive ([min_val, max_val]). |
|
Validates that an attribute's value is between two values, inclusive ([min_val, max_val]). |
- h2integrate.core.validators.gt_zero(instance, attribute, value)#
Validates that an attribute's value is greater than zero.
- h2integrate.core.validators.gte_zero(instance, attribute, value)#
Validates that an attribute's value is greater than or equal to zero.
- h2integrate.core.validators.range_val(min_val, max_val)#
Validates that an attribute's value is between two values, inclusive ([min_val, max_val]).
- h2integrate.core.validators.range_val_or_none(min_val, max_val)#
Validates that an attribute's value is between two values, inclusive ([min_val, max_val]). Ignores None type values.
- h2integrate.core.validators.contains(items)#
Validates that an item is part of a given list.
- h2integrate.core.validators.must_equal(required_value)#
Validates that an item equals a specific value