👈 Home

The raging controversy over form validation


Ask the experts where your input labels should be located, or multi-column forms beat single-column forms, and you’ll find broad consensus 😴.

There’s one aspect of form behavior, though, on which the experts are all over the place.

“Validate on submit” vs inline validation

Some forms accept any crazy input you care to provide, and only evaluate it when you click the ‘SUBMIT’ button. (Or the ‘SIGN UP NOW AND START SAVING💰’ button, if you’ve been CRO’ing your page.) This retro scheme is known as “validate on submit.”

Some forms give you feedback as you complete them; this is inline validation.

It tends to be annoying to validate while you’re typing, so most forms implement inline validation by giving feedback after you click or tab out of an input field. (Using the “onblur” event 🤓.) It looks like this:

GIF of a web form; First name is filled out, Last name is skipped, then shows an error message

The ‘Last name’ field is validated after the cursor leaves it

What’s the big deal about inline validation

The case for it:

The case against:

Strong arguments on both sides. And disagreement about fundamental conclusions - is it helpful or annoying? Does it speed up form completion, or increase frustration?

If smart people who study forms all day are divided over those questions, it might be worth asking another: does it impact conversions?

What to do about inline form validation

Possibly nothing!

But.

If you’ve already got a form that’s designed in accordance with all the noncontroversial best practices, and it’s getting submissions to the tune of ~1,000 per month … you could totally test validation strategies.

Before you do that, here are a couple of lower budget steps to help you decide if the test is worthwhile.

  1. Use session recordings and popcorn to qualify the problem. Get a dev to write code that tags your recordings when a visitor triggers a validation error. Make popcorn, dim the lights, sit down with your team, and spend 20 minutes watching visitors struggle with your form. You’ll laugh, you’ll cry. You’ll decide if there’s an obvious fix, or a need to test … or no reason to bother.
  2. Go crazy with Google Analytics events to quantify the problem. Fire a different custom event for every field that fails validation. Wait a month or two, then ask which fields present the most problems, how many visitors actually encounter errors, and how many form abandoners fired errors before noping out.
© 2022 Brian David Hall