Prevent errors before they happen
Sure, error messages can be of great help in guiding users to the next step after an error occurs, but what if these errors never occurred in the first place? As they say, prevention is certainly better than cure. Thinking from your users’ shoes is an integral part of UX writing because it helps you anticipate and prevent all that can go wrong even before it does.
Before moving on to writing good error message copy, the focus should be on writing helpful microcopy in the form of hints, labels, and tooltips that prevent these errors from occurring. For instance, if you know that users are prone to mistyping the expiry dates on their cards, offering a clear MM/YY placeholder text can help clear up any confusion.
Pro Tip! What error messages are most triggered on your site or app? Finding out can help you amend the microcopy in this area to make it clear and less likely to elicit user errors.