DocsValidators

uuid validator

RFC 4122 UUID v1–v5, lowercase or uppercase.

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

Implementation

Faithful summary of lib/validators.ts. Validators are pure functions and run identically in the worker, the Workbench, and the MCP server.

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')
}

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: uuid

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`.

Related templates

No template in the default catalogue ships with uuid preconfigured. Use it on a custom template via the YAML snippet above, or via the template editor.

Pricing

Validators run on every committed row

Schema-only mode (headers + ≤3 sample rows) is free and unlimited; full-data commits are metered. See plans →