pyrtma.validators.IntArray
- class IntArray(validator, len)[source]
Bases:
ArrayField
[_IV
],Generic
[_IV
]IntArray validator class
IntArray validator class
- Parameters:
validator (Type[IV]) – Field validator class for Int type
len (int) – Field length
Methods
Raises ValueError if the value is not present.
Validate array
Validate multiple values
Validate one value
- count(value) integer -- return number of occurrences of value
- index(value[, start[, stop]]) integer -- return first index of value.
Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but recommended.
- validate_array(value)
Validate array
- Parameters:
value (ArrayField) – Array value to validate
- Raises:
TypeError – Wrong type
- validate_many(value)
Validate multiple values
- Parameters:
value – Values to validate
- validate_one(value)
Validate one value
- Parameters:
value – Value to validate