Skip to content
Zotonic
  • Start
  • Cookbook
  • Reference
  • Releases

Live search

Search across all Zotonic content

Type at least two characters

Results are matched against titles, summaries and topics as you type.

Validators · mod_base
  • Reference
  • Frontend developer
  • Email
  • Template validator
  • Validate

email

Module

mod_base

Check if the content of the input field is an e-mail address.

For example:

<input type="text" id="email" name="email" value="" />
{% validate id="email" type={email} %}

Arguments

ArgumentDescriptionExample
failure_messageMessage to show when the entered value is not an e-mail address. Defaults to “Incorrect E-mail”failure_message="Please enter your e-mail address."

Edit on GitHub

date Validators format

date Forms and validation email_unique

Related documentation

Validators

email_unique

Check if an entered e-mail address is unique by querying model#identity for the email key:

Validators

page_path_unique

A validator to check whether a resource’s page path is unique:

Validators

hasedge

A validator to check if a resource has a certain number of edges with a predicate.

Validators

acceptable_password

A validator to check whether a password conforms to the password secutiry requirements.

Validators

json

Validate that a form value is JSON.

Validators

numericality

Numerical input and range check.

Filters

is_valid_email

Test whether a value has valid email-address syntax.

Validators

name_unique

A validator to check whether a resource’s name is unique:

Validators

format

Regular expression test.

GitHub © 2026 Zotonic