What is the right way and time to signal validation problems to the user?
I'm developing a GUI-based desktop application. In one dialog, the user can enter a couple of numeric values. The set of values must always pass certain validity checks.
As an example, suppose there's two value fields, one for the inner diameter of a tube, and one for the outer diameter. An obvious validity check would require the inner diameter to be less than the outer diameter.
The actual dialog requires about ten such values, and the checks are complex. Then again, my users will have the necessary experience, and will be able to correct an error.
I'm dithering about the right reaction to the case where one of the checks fails. The reaction should be familiar to the user and hence not need extra explanation, but it should also not be annoying and let the user continue as far as possible in their workflow.
Currently, the following alternatives stand to discussion:
- Allow any values to be entered, but color the background of all values which fail some checks in an ugly orange (other GUIs show a red asterisk or the like next to the field). Also, disable the [OK]-Button as long as checks fail.
Pros: This allows the user to type around as they please and to get back to the funny values eventually, it doesn't let them enter invalid data.
Con: While I favour this solution, I've never seen this solution before, so most likely it is not familiar. - When the focus tries to leave a field in which a value has been entered which violates some consistency check, show an error message which explains the problem. Also, don't allow focus to leave the field.
Pro: This is likely familiar, as I've seen it a couple of times before.
Cons: Clicking away error messages is annoying. Also, the user might prefer to continue typing in other values. The value which is actually invalid, after all, might be in another field, or the user might prefer to be able to get back to this field later on. - When any consistency check fails, wait for the user to click [OK], and then display an error message. Also, try to put the focus onto the field which contains the funny value (which isn't well defined even in my simple example above).
Pro: Familiar. Also, lets the user type ahead freely.
Con: The user is kinda lured into clicking [OK] and then surprised with an error message.
What is the most user-friendly way to point out that the values are inconsistent?