Key Takeaways
- Inline validation can save users time and effort and help them avoid errors
- Yet 31% of sites don’t have any inline validation at all — increasing friction for users who have errors
- Avoiding premature validation, removing error messages when an input is corrected, and using “positive inline validation” help to ensure top performance of the inline validation feature
Receiving unexpected error messages can be a jarring and frustrating experience.
Across multiple rounds of Baymard’s large-scale testing, these often contributed to form or checkout abandonment.
While error message styling and content can make it easier for users to locate and remedy errors, the delay caused by completing the form and submitting it only to be stopped by an unexpected error message can be significant, introducing friction to the form-submission process.
Effectively, receiving an error message on form submission means that sites have already missed an opportunity to prevent the error from occurring.
Yet our Premium research findings indicate that validating users’ inputs inline — as they’re filling out a form field — can mostly resolve this issue.
Yet 32% of sites in our e-commerce UX benchmark fail to provide any field validation at all.
In this article we’ll discuss the following:
- Why getting errors only when submitting a page is harmful to end users
- How inline form validation alleviates the issue
- 3 critical details to get right when implementing inline validation
Why Getting Errors Only When Submitting a Page Is Harmful to End Users
Participants in testing who encountered an error message upon form submission were forced to come to a complete stop to find and resolve the error.
This typically leads to significant delays and occasionally causes abandonment when the error is too difficult to locate or unclear how to resolve.
Compounding the issue, many forms reset upon submission, removing user entries and selections.
Therefore, users are forced to resolve not only the error at hand but also to duplicate previous work.
In reality, error messages disrupt the natural process flow, surprising users who expect to move on to the next step after hitting the “Submit” button.
How Live Inline Form Validation Alleviates the Issue
In testing, we’ve repeatedly observed that a better solution to error messaging that consistently improved the participants’ error-recovery experience was live inline validation.
Live inline validation is where the validity of the user’s input is checked immediately as the user types in the full value or leaves the field.
In practice, inline validation introduces several benefits over traditional error messages presented upon form submission.
First, users are informed of the error immediately and, as a result, won’t to the same degree need to come to a full stop to figure out where the error is, making the process of locating the errors significantly simplified.
Inline validation also efficiently draws attention to any required fields that users skipped while tabbing through the form, preventing any associated error messages.
Next, because users are alerted to input issues immediately after typing, the amount of time needed to correct the error decreases significantly, as the input and its context are still fresh in the user’s mind.
On a more traditional after-the-fact error page, the incorrect input will have to be relearned, as it can be several fields and minutes ago that the user read the label for the incorrect field and typed the incorrect input value.
Also of note, inline validation does not entirely replace the need for traditional error page and design, since users may still attempt to submit the form even with inline validation errors present.
3 Critical Details to Get Right When Implementing Inline Validation
To ensure inline validation performs as best as possible for users, it’s key to implement the following:
- Avoid premature validation
- Remove error messages as soon as the field is corrected
- Use “positive inline validation” for all fields
1) Avoid Premature Validation
It’s important to avoid taking validation too far and provide critical feedback before users begin entering information.
While the point of live inline validation is to alert users of incorrect inputs early on, overly aggressive premature validation negatively impacts the overall experience as users are told their input is wrong before they have had a chance to type it correctly.
In testing, participants were often frustrated by overzealous inline validation suggesting they had made a mistake before they even had a chance to type the input correctly.
As one participant from testing said, frustrated at the immediate validation error when he moved focus to an empty field for the first time, “Why are you telling me my email address is wrong, I haven’t had a chance to fill it all out yet!”
Moreover, as an error message is shown, we observed other participants’ typing was disrupted as they stopped to read and interpret the error — misleading some to incorrectly interpret the message as suggesting that their perfectly valid input was actually wrong.
To keep live inline validation from becoming a distraction and annoyance, it’s key to fine-tune the logic for when the field is checked for errors.
When users enter a new field, without any existing errors, and start typing, the validity of the input should not be checked before the user has had a chance to fully type a correct input.
Depending on the type of input, this means that the validity of each field input should be checked when the user leaves the field — for example using an onblur
event.
In addition, for some field types, sites can also check the validity once the input has reached the correct character length, such as for ZIP and postal codes, phone numbers, credit card numbers, card security code inputs, etc.
2) Remove Error Messages as Soon as the Field Is Corrected
When an error has occurred and a live inline error message is shown to users, they will naturally try to correct it immediately.
However, some sites with inline validation do not remove the error message live, as soon as the user has resolved the issue, which led to compounded problems during testing.
After resolving the issue suggested by the inline error message, participants often focused intensely at the error message, expecting it to be removed as soon as the field contained the correct input — rather than leaving the field, which would then often remove the inline message.
In practice, this can cause grave issues as users are likely to misinterpret their newly corrected, and now valid, input to still contain an error.
This is particularly so for fields where validity is interdependent, such as email and password confirmation fields.
It’s therefore key that when an error is invoked using live inline validation, the logic for rechecking the validity of the incorrect field does not happen only as users leave the field.
This means that rechecking the validity of the incorrect field is not based solely on an onblur
or similar event.
Instead, the error message must live update on a keystroke level, disappearing the moment users enter a valid input.
3) Use “Positive Inline Validation” for All Fields
Finally, if positive inline validation is used, even users without any incorrect input will benefit.
Positive inline validation removes some cognitive load from users since they don’t have to review and validate the form for errors before submitting it.
With positive inline validation, a site can assure users that their input is correct, and the user is able to more quickly move to the next step of the checkout flow.
During testing, sites that used positive inline validation, by adding a checkmark next to correctly inputted values, added a sense of accomplishment and progression to the whole typing experience.
Positive inline validation also helps risk-averse users trying to preempt validation errors and those users who would otherwise meticulously review the entire completed form before submitting it.
Help Users Catch Input Errors Early
Our large-scale testing has shown that, even if forms are perfectly designed, users will invariably have errors.
Typing, especially on mobile devices, is challenging, and minor mistakes are easy to make.
Yet how the site supports — or doesn’t support — users matters more than a user receiving an error.
In particular, by alerting a user to an error immediately via inline validation the user has a much better chance of quickly correcting the input and moving forward with checkout.
On the other hand, only showing errors to users when they’ve tried to submit a form can be a recipe for abandonment.
Yet our e-commerce UX benchmark shows that 31% of sites fail to provide inline validation.
Finally, having inline validation is only the start.
To have it perform optimally it’s key that fields aren’t prematurely validated, that error messages are removed as soon as the input is corrected, and that “positive inline validation” indicates to users “everything’s okay!” as they’re moving through a form.
Implementing these 3 key details will help to ensure that users are able to swiftly move through a form, supported yet unimpeded by the inline validation feature.
This article presents the research findings from just 1 of the 650+ UX guidelines in Baymard Premium – get full access to learn how to create a “State of the Art” e-commerce user experience.
If you want to know how your desktop site, mobile site, or app performs and compares, then learn more about getting Baymard to conduct a UX Audit of your site or app.