argclz.validator.IntValidatorBuilder#
- class argclz.validator.IntValidatorBuilder[source]#
Bases:
AbstractTypeValidatorBuilder[int]a int validator
Methods Summary
__init__()freeze(*args, **kwargs)(internal use) return a copy of itself.
in_range(a, b, /)Enforce a numeric range for int values
negative([include_zero])Check if an int value is negative or non-positive.
optional()positive([include_zero])Check if an int value is positive or non-negative
__call__(value)Details
- __call__(value)#
- Parameters:
value (Any) – type-casted value.
- Returns:
True if value pass the validation.
- Raises:
ValueError – when value does not pass the validation.
- Return type:
- freeze(*args, **kwargs)#
(internal use) return a copy of itself.
- Return type:
Self
- optional()#
- Return type:
Self