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?
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).
Well... we should distinct validation process into two phases:
- 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
- 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.
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.
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.
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.