Accent Fields Text

Email

Text plus a format contract — the HTML standard’s own definition of a valid address.


Text input, plus a format contract: a string whose value must be a valid email address. Same storage, same editor — the difference is one validation rule at the write boundary.

Declaring one

Label Contact email
Key contact_email
Data type string
Editor text_input
Validation email: true

The contract

The boundary checks the value against the HTML standard's own definition of a valid email address — the same rule the author's browser applies to input type="email" — so the field never disagrees with the form control in front of it. Blank stays required's question: a format rule never flags an empty value, so optional-but-valid works without a second rule.

<a href="mailto:<%= cms.asset.content.contact_email %>">
  <%= cms.asset.content.contact_email %>
</a>

When not to use it

  • A list of addresses — one value per field; several recipients are a repeater of these, not a comma craft project.
  • Anything you will send mail to programmatically — validation says well-formed, not deliverable. Confirmation is a workflow, not a field rule.