Input validation testing: what to type, what to expect
The wrong values worth typing into each kind of field, what a good refusal looks like, and why input validation in the browser alone is not enough.
A wrong-format input is a value of the wrong shape for its field: letters where a number goes, an email with no @, the 31st of February. Trying them is the core of input validation testing: for each field, type one, press the button, and check two things. The app refused it. And the refusal was useful.
You don’t need a big list of strange strings. You need one wrong value per kind of field, and you need to try it in two places.
Input validation tests: one wrong value per kind of field
| Field | Type this | Also worth one try |
|---|---|---|
editor.example.com (no @) | editor@ · an address with a space at the end | |
| Number | abc | 0 · -1 · 2.5 where a whole number is meant (see boundary values) |
| Date | 31/02/2026 | A date in the past where only the future makes sense · an end before its start |
| Web address | not a website | An address without https:// |
| Phone | not a phone | A number with spaces and a +, which is a right format many forms refuse |
| Anything with a stated pattern | !!! | The right characters in the wrong count |
The first column is the case. The last column is for fields that matter (the email on sign-up, the amount on an invoice).
Number and date fields often won’t let you type the wrong value at all. That is the browser’s guard working. Try those values past the form (below), where your server meets them. A phone field is the opposite: it has no browser check, so what you type goes straight to your server.
Notice the phone row. Wrong-format testing has a twin: right formats that the app wrongly refuses. A real address like name+tag@example.com, a phone number written the way people write them, a name with an apostrophe. Refusing those loses real users, and no error log will tell you.
What a good refusal looks like
Here is our practice app’s login form with the @ left out.

That is the browser speaking, because the field is declared as an email field. It is a good model for your own messages. It points at the field. It says what is wrong in words a person can act on. It keeps what was typed so they can fix one character. Making your own messages work for screen readers as well is in accessible form error messages.
A refusal passes if:
- Nothing was saved or sent.
- The message is at the field, or names it.
- It says what shape is expected, not only that the value is “invalid”.
- The wrong value is still in the field, and so is everything else.
“Invalid input” above the form fails number 2 and number 3. An emptied form fails number 4, and that one makes people leave.
The browser is strict. Is your server?
The set-up wizard in our practice app asks for a team size. The field is declared as a number with a minimum of 1, and the browser guards it well. Here it is refusing two and a half people.

It refuses 0 the same way, and you can’t type letters into it at all. It is the same two guards as on the empty form. If you stopped here you would write “team size: validated” and move on.
But the browser’s check lives in the page, and a request doesn’t have to come from the page. We changed the field to a plain text field in the developer tools (two clicks), typed lots, and pressed “Next”.

“All set”. The server took the word and stored it as the team size. There is no check behind the browser’s check.
A common finding: validation that exists only in the page. It looks finished, and it works for everyone who uses the form the normal way. It fails for the API client, the import script, the mobile app that posts to the same endpoint, and the one curious user.
So try each wrong value twice:
- Through the form, the way a person would. This tests the message.
- Past the form: edit the field’s type in the developer tools, or send the request with a command-line tool. This tests the server.
If the second attempt saves, the first one was only decoration.
The values that count as “wrong” depend on the field’s promise
A field is only wrong-format testable against what it promises. An email field promises an email. A plain text field called “Company” promises nothing, so !!! is a fine company name and the app is right to accept it.
Before you test, read the form the way a stranger would. What does each field say it wants? A label (“Team size”), a placeholder, a hint, the keyboard a phone shows for it. That is the promise. Then break each promise once.
Where a field makes no promise but the app depends on a shape anyway (a “price” typed into a free text box and later multiplied), you’ve found a different bug: the field should have promised.
Don’t forget what happens next
The same as with any refused input: fix the value and send again. A form that refuses well and then can’t recover is half tested. We cover that case in wrong, then right.
How EveryRole runs this case
“Wrong format” is a main case at a form, and it applies when a field states a format: an email, number, date, web address or phone field, or a field with a stated pattern. Code makes the wrong value from fixed rules: not an email in an email field, abc in a number field, not a date in a date field. It types them like a person, so where the browser won’t take the characters (letters in a number or date field) the field stays empty and what you see is the browser’s guard, the same as the Empty case. In email, web address and phone fields the wrong value lands and the page has to answer it.
It then records what the page said about the field and where the person ended up, shows you that first result, and from your yes onwards compares each run with it. Zero, negative and largest numbers, and dates in the past, are extra cases you can turn on for the forms where they matter.
It tests through the form, like a person. The second attempt, past the form, is still yours to do: once per field, the day you write it.


