Docs · Validators

email validator

Lenient `local@host.tld` shape check. No DNS, no SMTP.

Reference

Format

Matches `/^[^\s@]+@[^\s@]+\.[^\s@]+$/`. Anything with a non-empty local part, an `@`, a non-empty domain, a `.`, and a non-empty TLD passes.

Examples

  • alice@example.com
  • a+b@sub.example.co.uk
  • invalid: alice@@example.com (double @ caught)

How it runs

Implementation

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

lib/validators.ts
function validEmail(value) {
  return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)
    ? OK
    : fail('email_invalid', 'not a valid email')
}

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.

template.yaml
fields:
  - column: email
    type: email
    validators:
      - type: email

Watch out

Common gotchas

  • Shape check only. We do NOT verify MX records, do not call SMTP, and do not implement RFC 5322. `foo@bar.baz` passes even if the domain has no mailbox.
  • Quoted local parts (`"a b"@example.com`) and IP-literal domains (`alice@[127.0.0.1]`) are rejected.
  • Internationalised emails (Unicode local part / IDN domain) currently pass via the loose pattern — but downstream FHIR `ContactPoint.value` will reject non-ASCII.

Catalogue

Related templates

  • Usersusers_v1

    User directory: identity, contact, role, and onboarding metadata.

    Fields: email

  • Patient demographicspatient_demographics_v1

    Patient identity. Emits FHIR Patient.

    Fields: email

  • Leadsleads_v1

    Sales leads: contact, source, status, and creation metadata.

    Fields: email

  • Contactscontacts_v1

    People at named accounts: identity, contact details, role, decision-maker flag.

    Fields: email

  • Opportunitiesopportunities_v1

    Deals in pipeline: amount, stage, probability, close date, owner.

    Fields: owner_email

  • Customerscustomers_v1

    Repeat e-commerce buyers: identity, contact, default shipping, lifetime stats.

    Fields: email

  • Employeesemployees_v1

    Employee master records with identity, contact, and bank details. Contains PII.

    Fields: email

  • Candidatescandidates_v1

    Recruiting pipeline: applicant contact, role, and stage.

    Fields: email

Pricing

Validators run on every committed row

Validators add no AI cost — they are pure functions. Every map bills a small flat per-map fee from your prepaid token wallet ($10 minimum, shared across our suite); only columns that reach the metered LLM layer, plus any-to-any convert and reshape, bill real AI tokens. See pricing →

Ready when you are

Validate every row — before it lands.

Attach checksum-strict validators to any field, and gate risky commits with the requires_hitl flag. One key runs the whole cascade.

Prepaid token wallet · schema-only data-minimization mode
email validator — AdaptivMapr