Email field test cases
Email validation goes wrong when it turns away a customer with a perfectly valid address, and when it accepts an address that can never receive mail. Rejected customers rarely complain, they just leave, so start with the valid addresses.
Valid addresses that forms reject
| Input | Why it matters |
|---|---|
[email protected] | Plus addressing is valid and widely used to sort mail. Forms that allow only letters, digits, dots and hyphens before the @ reject it. |
[email protected] | Capital letters. The domain part is case-insensitive, and in practice mail providers treat the whole address that way. |
o'[email protected] | An apostrophe is allowed before the @. |
[email protected] | Subdomains and longer endings. |
[email protected] | Top-level domains longer than three letters. |
When a case like this fails, check where. A rejection right in the field is visible and easy to report. A rejection that happens later, on the server, is the dangerous one (see below).
Invalid addresses that forms accept
| Input | Problem |
|---|---|
[email protected] | Two dots in a row leave an empty part of the domain. |
[email protected]. | Trailing dot. The HTML standard's own email check rejects it. |
anna@@example.com, anna.example.com | Two @ signs, or none. |
anna@example | No dot in the domain. Technically valid inside some networks, useless for a public shop. Decide what the requirement wants. |
[email protected] | Spaces around a valid address: should be trimmed, not saved as they are. |
A simple pattern like "something, @, something, dot, something" accepts most of these. That is
why "the field rejects abc" says little about the validation.
The case of the missing error
Sometimes the page accepts the address, the request goes to the server, the server fails on it, and the page does not tell you. The button just does nothing, or the confirmation never appears. Users try a few times and leave.
To catch it, keep the browser's developer tools open on the Network tab while you test the cases
above. After each submit, look at the response status. A 500 or 400 with
a blank page is a bug even if nothing on screen looks broken. Capital letters and plus signs are
the usual triggers, because the page and the server often validate them differently.
Where the address goes next
- Is the address stored the way you typed it, or lowercased? Either can be right, but it should be
consistent, especially for login and duplicate checks:
[email protected]and[email protected]should not become two accounts. - Does the address show up in places it should not, such as the browser console or the page URL? Open the console after submitting. An order response logged in full, email included, is a privacy bug.
- Does an error message for the email disappear once you correct the address?
A short set for a timed session
If you have five minutes for the email field, use these: one plain valid address, one with
+, one with capital letters, [email protected], and an empty field. Watch
the Network tab for each.
Open the practice form
More guides: promo codes · double submit · all guides