Forms
Form error messages: best practices for wording and placement
A good form error message sits next to the field it is about, says in plain words what went wrong and exactly how to fix it, and appears when the person has finished with the field or pressed the button, never while they are still typing. The best error message of all is the one that never appears, because the rule was written into the label first.
Nuwan Madhusanka · Co-founder
8 min read · Published
The best practices for form error messages fit in one sentence: show the message next to the field, say in plain words what went wrong and how to fix it, show it when the person has finished with the field or pressed the button rather than while they are typing, and never clear what they already entered. Everything else is detail about wording, colour and summaries. And because every error is an instruction that arrived too late, the most effective practice happens before any message is written: put the rule in the label so the mistake never happens.
WCAG sets the floor. Success criterion 3.3.1, Error Identification, requires that a detected error is identified and described in text. Success criterion 3.3.3, Error Suggestion, adds that the message should suggest a correction when one is known. W3C’s own illustration is the difference between “Email is not valid”, which meets the first, and a message that also gives the expected format, which meets both.
When to validate
Early enough to help, late enough not to nag. Baymard Institute’s usability testing found that inline validation, which checks an answer as the person fills in the form, saves time and helps people fix mistakes while the answer is fresh, yet roughly a third of the e-commerce sites in its benchmark offer no inline validation at all. The same research also found the opposite failure: validation that fires the moment a field receives focus, or while the first characters are being typed, tells people they are wrong before they have had a chance to be right.
Baymard’s three rules are to avoid premature validation, to remove the message as soon as the field is corrected, and to confirm correct answers as well as flag wrong ones. In practice that means checking a field when the person leaves it.
A form built in this builder checks at fixed moments rather than field by field. A missing required answer is named when the person presses Submit, or Next on a paginated classic form, which checks only the fields on that step. Length limits and number ranges are checked when the whole form is sent. That makes prevention the main lever, and the payroll change form shows how far it goes: only seven of its twenty two fields are required, and every section says out loud that it can be skipped when it does not apply. Fewer required fields means fewer moments where a message can appear at all.
Where the message goes
GOV.UK puts each error message after the question text and hint, uses a red border to connect the message to its field, and refers to the specific part of the question when only one part is wrong, such as a year in a date. It also insists on keeping every answer when showing an error, the ones that passed and the ones that failed, so people can see what went wrong and edit rather than retype.
For screen reader users, GOV.UK’s component includes a visually hidden “Error:” before the message, so it is heard as an error and not as ordinary text. Whatever system you use, test with a screen reader that a message is announced when the form is sent.
On a published form built here, the message naming a missing field appears as a short notice when the button is pressed, and the answers already entered stay in place. A paginated classic form surfaces problems one step at a time, which would keep each round small on a long application such as the rental application form, where 10 of 27 fields are required.
Wording formulas
GOV.UK’s guidance is the most complete published set of rules, and most of it reduces to three.
Describe what happened and how to fix it. Plain English, positive language, straight to the point. No technical jargon, no “please”, which implies a choice, no “sorry”, which fixes nothing, and no “valid” or “invalid”, which add nothing. No “oops”.
Be specific. GOV.UK names the generic messages to avoid: “An error occurred”, “Answer the question”, “Select an option”, “Fill in the field” and “This field is required”. A text field can be empty, too long, too short, in the wrong format or using characters that are not allowed, and each needs its own message.
Use instructions for empty fields and descriptions for broken rules. “Enter your first name” for an empty field. “First name must be 35 characters or less” for one that is too long. Use both kinds, consistently.
There is one builder specific rule on top. The form builder writes its own message for a missing required field, and there is no setting for custom error text. A classic form says the label followed by “is required”. A conversational form says “Please answer:” followed by the label. So the label is the message, and it should be written to survive that sentence. On a classic form, a noun phrase works best: “Driver licence or passport number is required” reads cleanly, while a question such as “Why are you leaving?” followed by “is required” does not. On a conversational form, a question reads naturally after “Please answer:”. The rental form’s required consent field is labelled simply “Consent”, which produces a message that says what is missing but not which of its two boxes still needs a tick; a longer label would carry more.
Uploads are the one place the builder’s messages already follow the specific rule. A file that is too big produces a message naming the file and the size limit, and choosing too many files produces a message saying how many more can be added.
Colour and icons
Colour helps people who can see it and fails everyone else. Success criterion 1.4.1, Use of Color, rules out colour as the only way of conveying information, which is why GOV.UK pairs its red border with a text message rather than relying on either alone. An icon beside the message is a useful third signal, not a substitute for the words.
The same applies before an error exists. A classic form marks required fields with an asterisk after the label, a symbol that survives greyscale, and a line near the top explaining what the asterisk means removes the guesswork. The dropdown against radio buttons note covers the related choice of showing every option at once, which prevents the “Select an option” error on short lists because the choices are always visible.
A summary at the top
On a long page, a message beside the field is not enough, because the field may be off screen. GOV.UK’s error summary appears at the top of the page whenever there is a validation error, even a single one, under the heading “There is a problem”, with a link to each answer that has an error and wording identical to the message beside the field. It also recommends adding “Error:” to the start of the page title so screen readers announce it early.
A form built here names the first missing required field rather than listing them all, so a person who skipped three fields meets three messages in turn. Two things make that painless: fewer required fields, and a paginated layout on long forms so each check covers one step. The warranty claim form takes a third approach and asks for the serial number and proof of purchase before the description of the fault, with the location of the serial written into its label, “under the frame, on a silver label”.
Messages that work, row by row
The table at the end of this article lists thirteen common errors, from an empty required field to a problem on the service side, with a weak message and a stronger one for each. Field names come from the example forms on this site. Use the good messages two ways: as the wording for any validation you write yourself, and as a guide to labels and sub-labels in this builder, where the rule has to be visible before the answer rather than after it. The abstract submission form is the model for that second use: “Background, up to 700 characters” states the limit in the label, so the too long error never needs to appear.
Common mistakes
Validating on the first keystroke. People are told they are wrong before they have finished being right.
Clearing the form after an error. Keep every answer, including the ones that failed.
Generic messages. “This field is required” on ten fields tells nobody which ten.
Colour as the only signal. A red outline means nothing in greyscale or to a screen reader.
Limits nobody could see. A maximum length that only appears in an error message after the form is sent is a rule that was hidden.
Build it
Validation in the builder is set per field: a Required switch on every input, minimum and maximum length on short and long text, and minimum and maximum value on number fields. File upload adds a maximum number of files, a maximum size and two allowed type toggles, images and PDF. The form field types page lists all 41 component types and which builder offers each, and the form builder components guide shows every setting. Because there is no custom error text, put limits and formats in the label or the sub-label, and put longer rules in a paragraph component above the field, since a classic field’s description box is not shown on the published form except on file upload and photo fields. The companion article on rental application form fields covers what the embedded form asks and why.
| Error | Bad message | Good message |
|---|---|---|
| Required text field left empty | This field is required | Enter your driver licence or passport number |
| Required choice not made | Select an option | Select a lease term |
| Required consent not ticked | You must agree | Tick both boxes to consent to the tenancy check and confirm you read the privacy notice |
| Text longer than the limit | Invalid input | Background must be 700 characters or fewer |
| Text shorter than the limit | Too short | BSB must be 6 digits |
| Number outside the range | Value out of range | Percentage for this account must be between 1 and 100 |
| Wrong format | Invalid email | Enter an email address in the correct format, like name@example.com |
| Date on the wrong side of today | Invalid date | Purchase date must be today or in the past |
| File too large | Upload failed | receipt.jpg is larger than 10 MB, so choose a smaller photo |
| Too many files | Error | Choose 2 files or fewer |
| Wrong file type | Unsupported file | Upload a PDF or a photo |
| Answer the system cannot find | Serial number invalid | Check the serial number on the silver label under the frame and enter it again |
| Problem on the service side, not the person's | Oops, something went wrong | The form could not be sent. Try again in a few minutes |
A finished example
A rental application form template collects the property and offer, the applicant's identity, their current and previous address, employment and income, references and signed consent to screening. This one is a residential application, one per adult, that takes about ten minutes with identification and payslips to hand. It covers occupants and pets, agent contacts, an employment table, a proof of income upload, two non family references, and a signed consent to a tenancy database and credit check.
Read the rental application formQuestions people ask
Should errors appear while someone is typing?
Not before they have had a chance to finish. Baymard Institute's testing found people frustrated by validation that fired as soon as a field received focus or after the first keystroke, telling them an answer was wrong before they had typed it. Check a field when the person leaves it or presses the button, and remove the message as soon as the answer is corrected.
Where should a form error message go?
Next to the field it describes, after the question and any hint, with a visual link such as a coloured border. GOV.UK also shows every error in a summary at the top of the page, worded exactly as it appears beside the field, with a link to each answer. Never clear what the person typed when showing an error, including the answers that were fine.
Should an error message say please or sorry?
GOV.UK advises against both. Please implies a choice when the field has to be fixed, and sorry does not help anyone fix anything. It also rules out words like invalid, forbidden and you forgot, humorous words like oops, and technical codes. Say what happened and what to do, in the plainest words that fit, and read the message aloud to check it sounds like a person.
What makes an error message accessible?
It names the field and the problem in text, which is WCAG success criterion 3.3.1, and where the fix is known it says what to do, which is 3.3.3. Colour alone cannot carry the error, so pair a red border with words. Test with a screen reader that the message is announced when the form is sent, since a message nobody hears helps nobody.
Can I write my own error messages in the form builder?
There is no setting for custom error text. On a published classic form, a missing required field produces a message built from its label, and a conversational form says Please answer followed by the label. So the label is the message. Write labels that read well in that sentence, and put any length limit or format into the label, where people see it before they answer.
How do I reduce form errors in the first place?
Ask fewer required questions, print every rule before the answer rather than after it, and use choice fields where a typed answer has a fixed set of values. The payroll change example marks only seven of its twenty two fields as required and says in each section that it can be skipped, so most people never meet an error at all.
Written by
Nuwan Madhusanka · Co-founder
Works across the builders and the export paths: how a form becomes a PDF, how a flyer canvas becomes a print file, and how a signed document carries its audit trail.
LinkedIn profileWritten and checked by the OneCraft team. Last checked .
Make your own form
Describe what you need and the generator writes and designs it, then you edit anything you like.
See what it can makeRead next
How to write form instructions
Put each instruction where it is read at the moment it is needed: rules that decide whether an answer is accepted go in the label, a one line hint goes under the field, rules for a whole section go in a short paragraph above it, and what to have ready goes before the first question. Keep every instruction to one idea, and never leave anything important in placeholder text.
Form accessibility checklist
An accessible form gives every field a visible label tied to it, works from a keyboard alone, keeps enough contrast in its text and borders, describes errors in words, and does not rush anyone. The checklist below turns that into 20 checks mapped to WCAG 2.2 success criteria, each with a test you can run in a few minutes before publishing.
What to include in a rental application form
A rental application is a decision document: every field should help you decide identity, ability to pay, or history, and nothing else. Several regulators now publish lists of what you should not ask, so the field list is as much about what you leave out.
For the steps inside the builder, read the guide on this topic.