validators
validate_characters(characters_in=0, as_hex=False)
Validate a characters value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
characters_in |
int
|
Integer value passed from another function |
0
|
as_hex |
int
|
Bool value passed from another function |
False
|
Raises
Exception: When attempting to convert `characters_in` value to an `int` fails.
ValueError: When `trim_in` is less than 0, or greater than the length of a UUID string/hex (36/32 characters).
Source code in src/red_utils/std/uuid_utils/validators.py
validate_trim(trim_in=0, as_hex=False)
Validate a trim value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trim_in |
int
|
Value of |
0
|
as_hex |
bool
|
Value of |
False
|
Returns
(int): A validated `int`
Raises
ValueError: When `trim_in` is less than 0, or greater than the length of a UUID string/hex (36/32 characters).