How should a website explain form errors instead of just saying “Something went wrong”?

A worker reviews a form on a laptop at a desk beside a window.

Key points

  1. Name the affected field, explain the problem and give a next step instead of a generic error.
  2. Combine nearby field messages with a submission summary and retain entered information where safe.
  3. Use fictional test data for missing values, invalid formats and system failures; this is not a delivery test.

What should an error message contain?

Name the field, explain the problem and give a useful correction instead of asking the visitor to guess. For a missing required contact field, an example is “Please enter a contact method so we can reply to your enquiry.” This is an editorial example; the actual rule must match the form.

W3C’s error identification guidance requires automatically detected input errors to identify the affected item and describe the error in text.

How can vague wording become actionable?

List the existing messages and write a short instruction for each failure. For example, replace “Invalid format” with “Please enter a complete email address, including the domain after @.” Avoid blaming the visitor or claiming a record does not exist before that is established.

W3C error suggestion guidance calls for known corrections to be offered, with exceptions where security or the purpose of the content would be compromised. Detailed account messages must not expose another person’s account information.

A pencil and laptop sit beside form sketches in a notebook.

Should messages sit beside fields or above the form?

They can work together: nearby text explains the specific problem, while a post-submission summary lists outstanding items. The W3C form notifications tutorial describes linked error lists and nearby feedback. Ask the developer to handle focus and assistive-technology notifications separately; visible text alone does not establish that everyone receives the message.

A practical handover list can contain the field, trigger, message and correction. Chinese and English versions should describe the same rule, rather than making a field compulsory in one language and optional in the other.

Are red borders and red text enough?

No. W3C guidance on colour says colour must not be the only way to convey information. Add clear wording that can be matched to the field.

We recommend retaining entered information where safe after a failed submission, so correcting one field does not require starting again. The responsible person should decide whether sensitive information can be retained; it must not be saved indiscriminately. Messages should not obscure the submit button or other fields needing attention.

Should invalid input and a system failure use the same message?

No. Invalid input needs a correction; a service that cannot process a request needs an honest explanation that submission is unconfirmed, with a verified alternative contact route. Do not show “Received” without evidence or invent a response deadline.

We recommend checking input validation, submission state and back-office receipt separately. This article addresses clarity of error messages; it does not establish that a form has passed delivery, security or a complete accessibility assessment.

What should go into the acceptance checklist?

  1. List required fields and genuinely accepted formats.
  2. Use fictional data to test omissions, invalid formats and simultaneous errors.
  3. Check that the correct fields are identified and that correction allows progress.
  4. Check mobile presentation, keyboard use and assistive-technology notifications.
  5. Record actual results, screenshots, owners and unresolved items.

Do not accept a form on the basis of one successful submission. Resolve messages that block understanding or progress before polishing tone. Compare the same test scenarios before and after changes, without claiming unmeasured enquiry growth.

Frequently asked questions

Can we just say “Please check your details”?

It is not recommended. Identify the field and the next step so visitors do not have to inspect every entry blindly.

Does every error need a pop-up?

No. Nearby field messages and a submission summary may suit the form; dialogs need their own interaction and notification checks.

Can errors be indicated only in red?

No. Include text or another clear cue, as explained in W3C guidance.

Is a more detailed message always better?

No. Give enough information to correct the problem without exposing account or sensitive information or displaying raw internal errors. See W3C guidance on correction suggestions and security exceptions.

Do better messages prove an enquiry was delivered?

No. Message clarity and actual receipt require separate checks of submission and back-office records.

About the author: This article was written by the HKONE team. HKONE is a Hong Kong digital marketing and AI automation company providing social media management, website design, AI customer service and GEO / SEO for SMEs. Where this article mentions platform fees or policies, the platform's official information takes precedence.

Tell us about your business first. Then decide.

The consultation is free. We will understand your situation before recommending a plan and a quote.