1

I have a dialog that upon opening performs some data validation (none of the data visible). The dialog is determining whether an action can be taken or not.

The dialog has only two buttons - OK and Cancel. Cancel always closes the dialog without taking any action.

I am unsure about how the OK button should behave. If data validation passes, the OK button is intended to take some action against the database. If data validation does not pass I feel like I could do any of the following:

  1. Disable the OK button so the user can only click Cancel.
  2. Have the OK button execute the same action as Cancel (silently close the dialog).
  3. Display a message that says something to the effect of "This action is unavailable because blah blah blah".

Here's the way I am leaning and why.

I don't like #2 because it seems like the button is doing different things and the user is not aware of it. Did the dialog do what I wanted when I clicked OK or did it just close? I have no idea.

I like #3 slightly better than #1 because the user is allowed to attempt the action (i.e. clicking OK) but is told very clearly that they are not allowed to do so.

I am potentially OK with #1, but am concerned that a stubborn user may feel aggravated that the OK button is disabled without a clear reason as to why.

Are there any standard UX cues I can follow with this design?

2
  • Best combo imho is #1 + #3 (message should display as soon as validation fails)
    – Alex
    Sep 2, 2015 at 15:56
  • Perform the validation before the user clicks the button that triggers the dialog, and show them what fields need to be corrected to make their input valid? I am not sure why there is a dialog box - could you expand on that? Dec 22, 2015 at 10:48

2 Answers 2

1

A proposition from me is to use the #3 option starting the message with apology, then briefly explain why the action is unavailable and finally provide instructions on how to fix the error if possible.

Sorry, the action is unavailable due to this. Go here and change this.

Ideally the error message will be concise with red colored and should point to the problem area in the page.

However the best advice is awlays to user test because every interface is different.

2
  • When I was at a Norman Nielsen Group usability conference, they advised that words like "please" and "sorry" are unnecessary in a user interface. You are right that the message should be concise. Some websites take a flippant or humorous tone with their error messages, which can be amusing if it is done right, and if the tone is appropriate to your website. Jan 22, 2016 at 15:26
  • Hmm you are actually right, thanks for the comment! Jan 22, 2016 at 15:34
0

It depends a little on the validations you need, so more information on that might help us.

  • As soon as the user enters data and the system can validate, do it. If it's possible to flag a value as illegal when the user leaves the field, do that. The user has his attention still here and can fix a typo easily.

  • I advocate active "OK" (or "Save") buttons even if a mandatory (and starred) field is missing. The user might have overlooked the asterisk, and pressing "Ok" will flag the field with a more prominent message.

So I'd recommend #4 (similar to your #3): Enable "Ok", but display validation failures near to the field (and move the cursor into the first invalid field).

Your Answer

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

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