Skip to content

email

Validates that a field contains a valid email address.

Options

OptionTypeDefaultDescription
messagestringlocale defaultCustom error message

Playground

Valid values

ValueNotes
"user@example.com"Standard email
"user+tag@sub.example.co.uk"Subdomains and tags

Invalid values

ValueReason
"user@"Missing domain
"user"No @ symbol
"@example.com"Missing local part

Notes

  • Empty string ("") always returns valid: true — validators only run on non-empty values. Combine with notEmpty to require a value.

Released under the MIT License.