3

When filling in a very long form which has instant field validation (and required fields are marked with an asterisk), should validation take place if user focuses the field and without typing anything in moves focus to another field? In other words - should validation be performed when there is nothing to validate?

5 Answers 5

3

It makes no sense trying to validate something which you know doesn't exist in the first place.

Validation should take place when either the focus is changed, or there is some pause in entering information (e.g. 2 seconds).

5
  • 1
    Can you explain your second sentence please? Focus changes from empty field to another empty field.
    – Eimantas
    Commented Dec 6, 2011 at 10:35
  • Agree. Also: read Luke Wroblewski's Filling In The Blanks
    – katDNA
    Commented Dec 6, 2011 at 10:37
  • 4
    I disagree with validating after a pause in data entry. Could be the user is just thinking. Better just on focus change or form submission Commented Dec 6, 2011 at 10:46
  • Someone can go straight from a pause to submitting. The validation is there to give them feedback before they submit.
    – JohnGB
    Commented Dec 6, 2011 at 22:17
  • 2
    @JohnGB they can, but I prefer the method of validating individual fields after losing focus and validating the whole form on submit. It would still all be client side so there would be no page refresh. I just think validating after a pause will puzzle slow typing users Commented Dec 7, 2011 at 12:17
6

Well... we should distinct validation process into two phases:

  1. instant validation wchich purpose is to help user indicate potential issues in future. In other words the instant validation should only give a current status of form elements being filled but before the form submission
  2. submission validation - the real validation when user is about to submit data.

In the first phase there is no need to indicate that there are some data absence errors. In the second phase you should indicate them.

1
  • Good answer. I like the distinction between instant validation and submission validation.
    – Sheff
    Commented Dec 6, 2011 at 14:17
2

No. At this point it's not invalid with nothing in it until you try to submit it. With the other fields they can be invalid with content (i.e. entering alpha fields in an age field) and that is instantly an invalid field, but if the validation is that it needs to be entered before submitting then the only time it becomes invalid is on submit.

Also, you can't expect all users to complete the form in order, top-to-bottom. They may well tab down to the address first and then enter the preceeding fields later for whatever reason (maybe they're testing that an address exists in a postcode search before wasting time completing the rest of the form, for example). If you're validating on leaving the field then all the fields that are tabbed into and then tabbed out of would flag as an error. They're not errors, they just haven't been entered yet.

2

This is a good question because I see many forms validate before the user has typed anything in the field. I find that pretty annoying. I think the validation should happen after the user enters their information. If it's wrong it should display an error message. If it's right it should display a success message.

I find this article helpful when doing instant field validations: http://uxmovement.com/forms/why-long-forms-need-instant-field-validation/ There's also some useful jquery plugins in the article you can use to implement it.

1

Seems to me that this is less of a UX related question.

Here's my take at it (from my experience based on desktop client-server design):
Validation should only be performed if only there is an entry in the field. Depending on your application, you may want to have the validation conducted 'on-the-fly' (actually after suitable delay) during data entry rather than losing focus of the control.
In this way, it's less expensive (assuming communicating with server is required) based on number of redundant server calls.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.