The email type — a string validated as an email address.
email is a string shortcut (see String Types) whose value MUST be a valid email address. It shares the string MemberDef (choices, pattern, minLen, …) and adds email-format validation.
userEmail: email
---
~ test@example.com # ✓
~ notanemail # ✗ invalid-emailRestrict to a fixed set with choices:
companyEmail: { email, choices: [info@acme.com, sales@acme.com] }
---
~ info@acme.com # ✓
~ other@acme.com # ✗ mismatched-choiceSee Also
Last updated
Was this helpful?
