Form validation test cases: a checklist for any form
A form testing checklist you can copy: four form validation test cases that always apply, ten more for forms that matter, and what each must show.
Stop inventing form validation test cases for each form. Forms break in the same handful of ways, so the list of things to try is the same every time. Keep one list, run it on every form, and spend your thinking on the expected results. (Why a short fixed list beats a long invented one is in happy path vs edge cases.)
This is the list we use. Four cases for every form. Ten more for the forms that matter.

The four form test cases that always apply
| Case | Do this | It passes when |
|---|---|---|
| Good input | Fill every field with a normal value. Send. | The result is in the place it should live (the list, the profile, the inbox), with the values you typed. |
| Empty | Type nothing. Send. | The form stays. The message names the field. Nothing was saved. |
| Wrong format | For each field that states a format (email, number, date), type one value of the wrong shape. Send. | Refused at the field, in words that say what shape is wanted. Everything else you typed is still there. |
| Wrong, then right | Send it wrong. Fix only what was wrong. Send again. | It goes through. Exactly one record exists. |
Four cases, about a minute each by hand. Each has its own post if you want the detail: the empty form, wrong-format inputs, wrong, then right.
Two notes on the first row, because it is the one people get wrong. “Normal value” means a value you would expect a real user to type, written down exactly: Sample item, not “a valid name”. And “passes” is judged on a second page. The success message on the form is not the result.
The ten for forms that matter
Run these on the sign-up form, checkout, and whatever your app’s main form is. Skip them on the “change my display name” form.
| Case | Do this | It passes when |
|---|---|---|
| Each required field empty in turn | Fill everything but one required field. Repeat for each. | Each time, the message names that field and no other. |
| Too long | Where a field states a maximum, type one character more (see boundary values). | Refused or visibly stopped. Never saved cut short without a word. |
| Number edges | 0, a negative number, a very large one. | Each is accepted or refused on purpose. No crash, no “NaN” on the next page. |
| Date edges | A date in the past. An end before its start. | Refused where it makes no sense. |
| Special characters | A name with an apostrophe, an ampersand, quotes and <b> tags. | Saved and shown exactly as typed. Not cut, not doubled, not turned into bold text. |
| Valid but not found | For a form that looks something up: a well-formed value that doesn’t exist. | A clear “nothing found”, not an empty page and not an error. |
| Button pressed twice | Double-click the button. | One record. |
| Used twice in a row | Send the form, then send the same values again. | Either two records or a clear refusal, whichever you intend. Decide which. |
| Enter instead of the button | In a one-field form, press Enter. | The same as pressing the button. |
| Back returns | After sending, press the browser’s Back. | A sensible page. Not a resubmission, not a broken form. |
The special characters row deserves a word. If <b> comes back as bold text, the app is placing what users type straight into the page, and that is a security hole as well as a display bug. It is the one case on this list where a failure should jump the queue.
For forms that make something
If the form creates a thing with its own page (an item, a project, an invoice), the form is only the start of the feature. Add:
- It is in its list. With one of them, and with two.
- Edit it. Change a value, save, reload. The change is kept.
- Delete it. Then reload. It is gone, and so is its page.
That last one doubles as your clean-up. If every test deletes what it made and checks it is gone, your test account stays empty and the “list with none” case stays honest.
How to keep the list useful
Write the expected result once, from a real run. The table says “refused at the field”. Your app’s version of that is a specific message under a specific field. Run each case once, look, and write down what you saw if it was right.
Mark what doesn’t apply. A form with no number field has no number edges. Say so on the sheet (“does not apply: no number field”) so the next person doesn’t wonder if it was forgotten.
Don’t grow the left column. The pull is always to promote one more case to “always”. Resist it. A list of fourteen mandatory cases gets run on two forms and abandoned. A list of four gets run on all of them.
The same list, run by a machine
This is, deliberately, the list EveryRole works from. For each kind of stop it has a fixed set of cases, and code decides which apply from what the page declares: a “Too long” case only where a field states a maximum, “Wrong format” only where a field states a format.

The four in the left column are its main cases: they run every time they apply (wrong format where a field states one, wrong then right once the form has refused something). The rest are extra cases, off by default, that you switch on per form. Underneath, the same stop is checked for the other kinds of user: does the page open for a viewer or a signed-out visitor, and do they get its button.
Whether you run it by hand or not, the value is in the list being fixed. A fixed list means a form that skipped a case is visible. An invented list means nobody knows what was skipped.


