Docs · Validators
uuid validator
RFC 4122 UUID v1–v5, lowercase or uppercase.
Reference
Format
Matches `/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i` — hyphenated 36 chars, version nibble 1–5, variant nibble 8/9/a/b.
Examples
- 550e8400-e29b-41d4-a716-446655440000
- f47ac10b-58cc-4372-a567-0e02b2c3d479
- invalid: bare hex (no hyphens) is rejected
How it runs
Implementation
A faithful summary of lib/validators.ts. Validators are pure functions and run identically in the Worker, the Workbench and the MCP server — one implementation, so the three cannot disagree about whether a value is valid.
function validUuid(value) {
return /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i
.test(value)
? OK
: fail('uuid_invalid', 'not a UUID')
}Config
Use in a template
Validators attach to a field on a custom template. The cascade runs them after mapping but before commit; failures surface in the per-row validation report.
fields:
- column: external_id
type: string
validators:
- type: uuidWatch out
Common gotchas
- Version 6, 7, 8 UUIDs are rejected — the version nibble must be 1–5. If you emit UUIDv7, validate with a custom regex.
- Unhyphenated 32-hex form is rejected. Insert hyphens in your transform.
- NIL UUID `00000000-0000-0000-0000-000000000000` fails because the version nibble is `0`.
Where it runs
Three routes, no AI cost.
- POST
/v1/validate-rowValidate one row against a template. Stateless, no key, pure compute — the fastest way to try uuid against a real value.no key - POST
/v1/uploads/:id/validateRun every field validator over the parsed upload, without committing. Returns errors and warnings per row.read - POST
/v1/uploads/:id/commitValidates on the way out.skip_invalid_rowsdrops the failures instead of failing the commit.commit
Validators are pure functions, so they add nothing to the AI bill. Every map draws a small flat per-map fee from your prepaid token wallet ($10 minimum, shared across the phi-cloud suite); only columns that reach the metered LLM layer, plus any-to-any convert and structural reshape, bill real AI tokens. See pricing
Catalogue
Related templates
No template in the default catalogue ships with uuid preconfigured. Use it on a custom template via the YAML snippet above, or through the template editor.
Explore
All 19 validator types
The complete list a template field can declare. There is no SNOMED validator — it required an affiliate licence, no template used it, and it was removed in 2026.
- uuid
- regex
- enum
- date_range
- number_range
- phone
- url
- iban
- bic
- gtin
- pharmacode
- fhir_reference
- loinc_code
- icd10_code
- atc_code
- cpt_code
- npi
- gln
Back to the documentation index or browse the template catalogue.
Ready when you are
Validate every row — before it lands.
Attach checksum-strict validators to any field, and gate risky commits behind the requires_hitl flag. One key runs the whole cascade.