input4mips_validation.validation.tracking_id#
input4mips_validation.validation.tracking_id
#
Validation of the tracking_id attribute
PREFIX: str = 'hdl:21.14100/'
module-attribute
#
Prefix that we expect to start the tracking ID values.
This constant is exposed for clarity. If you change it, we do not guarantee correct performance of the codebase.
REGEXP_CHECKER: str = 'hdl\\:21\\.14100\\/[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}'
module-attribute
#
Regular expression to use to check that the tracking ID is correct.
Technically, this regular expression is not strict enough to check the UUID is actually correctly formatted. However, this is a helpful first check (if this fails, the tracking ID is definitely wrong) and ensures that the correct prefix is used.
This constant is exposed for clarity. If you change it, we do not guarantee correct performance of the codebase.
validate_tracking_id(tracking_id)
#
Validate the tracking ID value
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tracking_id
|
str
|
Tracking ID value to validate |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
|