email
Validates that a field contains a valid email address.
Options
| Option | Type | Default | Description |
|---|---|---|---|
message | string | locale default | Custom error message |
Playground
Valid values
| Value | Notes |
|---|---|
"user@example.com" | Standard email |
"user+tag@sub.example.co.uk" | Subdomains and tags |
Invalid values
| Value | Reason |
|---|---|
"user@" | Missing domain |
"user" | No @ symbol |
"@example.com" | Missing local part |
Notes
- Empty string (
"") always returnsvalid: true— validators only run on non-empty values. Combine withnotEmptyto require a value.