LanguageValues and typesStandard typesPeople and contact
On this page
An email address, checked as one.
Use it for any address you send to or sign someone in with. To keep the name shown beside the address, use EmailWithName. Either is personal data with no personal: on the field: it counts as PersonalData.contact.
Shape
One value, with no fields to fill in. As text it reads someone@example.com.
Example
Email("mary@example.com")text.parse(raw, as: Email) reads one from text that comes from outside. Text that isn't one at all fails malformed, such as someone, someone@ or @example.com.
Good to know
- Checking the form doesn't show that a mailbox exists. To find out, send a message to it.
==tells you whether two are the same.<andlist.sort_bydon't take it.- A field that holds one counts as personal data (
contact), so you don't mark it yourself.
In JSON
A string, in a request, a response or json.write:
"someone@example.com"Details
Text form, storage, how it is shown, and operations
Email is in the group People and contact, and has been in Jadpo since 0.1.0.
Text form
text.from writes one standard text form, the same form text.parse reads back: someone@example.com.
How it is stored
It is stored in one column named for the field, of type text. someone@example.com is stored as 'someone@example.com'.
How it is shown to people
text.format(value, locale:) shows it to people in their locale.
With locale: Locale.en_gb:
| Value | Shown |
|---|---|
someone@example.com |
someone@example.com |
Operations
It also takes text.parse, text.from, text.format, json.read, json.write and ==. How every standard type behaves says how they work.
Markdown for agents: /docs/types/type-email.md.Built from Jadpo main at aee2e8f.