Validators
string_max_length(max_length)
¶
Checks if a string is longer than a certain length.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
max_length
|
|
required |
Source code in ckanext/nhm/logic/validators.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | |
uuid_validator(value, context)
¶
Checks if a UUID is valid (used for MAM asset IDs). We check with a regex as MAM assets ids aren't valid UUIDs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
|
required | |
context
|
|
required |
Source code in ckanext/nhm/logic/validators.py
40 41 42 43 44 45 46 47 48 49 50 51 | |