I'm writing my own validation code for some of my forms and I'm wondering what the best way to indicate that there is a problem is.

Some ideas I've had:

  • Highlight the textboxes, checkboxes or controls in red if they have an error.
  • Put a small icon inside or near the control with the error (the error provider basically)
  • Display a messagebox explaining the error.
  • Use a balloon tooltip on controls with an error.
  • Prevent the user from leaving the control (which is kinda what the binding control does)

There are obvious pros and cons for all of these. My goal is to be as least intrusive as possible and allow the users to work fast, efficiently and be interrupted as little as possible, but at the same time, if there is a problem to let them know what that problem is and how to fix it.

Highlighting the controls with errors is somewhat standard on the web, you don't fill out a box it might change colour or might bold the label next to the control and optionally supply supplemental information on fixing the error. Supplying that extra information wouldn't be as simple with a forms application though.

Using the icons or error provider is good, but to me, it's not all that intuitive. A flashing icon is okay to indicate there is a problem, but it's not very intuitive to know what that problem is, hovering over that icon, that is.

Messageboxes are totally annoying and in my opinion should only be used if there is something that REQUIRES the user to stop what they are doing and fix or do something...I'd prefer to not use that.

Balloons are bulky and intrusive looking, they eat screen real estate and are, in my opinion, buggy.

Preventing the user from leaving the control is REALLY annoying, not much feedback is provided with that and in fact, with my background in psychology, I can tell you it only causes the user to click or hit the tab key harder thinking its a hardware problem...it's only after frustration that they realize there's a problem with what they did.

Does anyone have any other ideas/combination of ideas?

Recommended Answers

All 5 Replies

Indeed, MessageBox is horrible in this situation.
If at all possible prevent the user from typing wrong, I mean if the textbox accepts numeric input, don't allow the user to type some letters. Use a ComboBox or radiobuttons etc. instead of a textbox, if possible.

ddanbe,

True, and I do that already. I'm mostly concerned with someone leaving a required field (usually a textbox) blank.

The numeric filters and even a mask for formatting data correctly is something I already use.

As it is now, the controls that require input (all textboxes at the moment) are highlighted in red if the user clicks the "save" button and they are blank. I'm just not sure if by itself that supplies enough information to the user to know that a value is required and that when they clicked "save" a second ago, nothing was saved, they need to fix the blank box problem before it will be saved.

Is it, or would it be, safe to assume that a "normal" user would:

  • Know that a control that is highlighted needs a value.
  • Know that the "save" operation they expected to occur actually did not occur, and won't occur until they correct any errors.

All of this without explicitly saying "You need to fill x, y and z in first. Oh and by the way, until you do that, nothing is saved."

Do NOT assume anything about a user. Users tend to know what you assumed about them and are going to do the exact opposite.
You could as an extra show a small label next to your highlighted textbox.
Hide it when the textbox is filled. Perhaps disabling your save button, until a textbox is filled in, might be an option to consider.

Do NOT assume anything about a user. Users tend to know what you assumed about them and are going to do the exact opposite.

Do NOT assume anything about a user. Users tend to know what you assumed about them and are going to do the exact opposite.

Too true !

I'd go with the label option with it reading something along the lines of "please ensure all fields are completed before proceeding" of "please complete highlighted fields before proceeding", make it red, turn the opacity down so it isn't too harsh on the eyes and place it above all the radiobuttons and text fields.

I agree that I shouldn't make assumptions.

I like the idea of disabling the save button if a required field is blank. The label though...I don't know...I always thought that was more of an internet thing, not a Window's forms thing.

I think I'll use the button idea though!

Thanks for the suggestions and feedback!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.