What should my website say when a contact form has an error?

Name the field that needs attention and describe what is wrong in words. When you know how the visitor can fix it, include that step. A red outline alone leaves the visitor to work out why the form stopped.

Write the message for the error you actually detected

Imagine a repair shop's form requires an email address. If the visitor leaves it blank, the message could say, “Email address is empty. Enter an address where we can reply.” If the form detects a missing @ symbol, use “Email address needs an @ symbol. Check the address and try again.” Do not say an address does not exist when the form has only checked its format.

Separate a field error from a sending problem

“Check your email address” is misleading when the address passed validation but the form could not reach the server. For a confirmed sending failure, a clearer message is “Your message was not sent. Please try again later.” If the site cannot tell whether it arrived, say that instead of promising either success or failure.

Check the words against the form

In the site's test form, leave the required field blank and then enter an address without an @ symbol. Read each message beside its field label. Confirm that fixing the named problem lets you continue and that the message does not ask you to change something the form already accepted.