Geant ids
Type definitions for the GA and GS IDs.
validate_id(value, prefix, field_name)
Validate that the ID is unique, has the correct prefix, and is within valid constraints.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value
|
str
|
The ID value to validate. |
required |
prefix
|
Literal['GA', 'GS']
|
The required prefix for the ID. |
required |
field_name
|
str
|
The database field name to check for uniqueness. |
required |
Raises:
Type | Description |
---|---|
ValueError
|
If the ID is not valid. |
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
The validated ID. |