How should required field validation be handled visually?
NOTE: assume asterisk is red
*Name:[_______]
or
Name:*[_______]
or
Name: [_______]*
or
Name: [_red bg_ ]
or
Name(<- font color red): [_______]
or
You tell me a better way!
|
How should required field validation be handled visually? NOTE: assume asterisk is red *Name:[_______] or Name:*[_______] or Name: [_______]* or Name: [_red bg_ ] or Name(<- font color red): [_______] or You tell me a better way! |
||||
|
|
There's never a right or wrong answer with these type of questions and a lot of it depends on your users personas (engineers vs. power users vs. aunt alice who never used a computer) and context. A general rule is to use
Using the validation area for either a red asterisk to indicate a required field or an error message after validating the form (or both). The Simply Accessible website has a good, concise write up on required form fields here: http://simplyaccessible.org/examples/required-form-fields |
|||||||||
|
|
It depends a lot on various factors.
Gotchas:
|
|||
|
|
|
until recently this was the default and it is still very common and since everyone know what it is and what it means I like it. Name: [_]* but this is more modern and a lot of new sites use this type of thing. The problem is that if half the fields are red it yells at you and doesn't look pleasant so what many sites do is they wait for you to focus on a required control and then turn it red. The problem with that is that if I don't focus I won't know until I submit and get feed back Name: [red bg ] which brings me to what I prefer. Put a star or some other marking so people can see at a glance what needs to be filled in and then when a field is focused change the bg color and on validation if the field fails show it in red. |
|||
|
|
|
Keeping the asterisk could be useful rather than simply color-based indicator (+1 for accessibility). Throw in a title attribute on the asterisk as well, e.g. <span title="Required Field">*</span> This is probably necessary anyway to style it appropriately I don't think the asterisk position is critical -- just be consistent! |
|||
|
|
|
I think I've done all of those at one point or another. What I've fallen into more recently is something that takes more work but I think is better for the user. Basically, you give a small red popover box with a stubby arrow pointing toward the field in question, telling them it's a required field. Displaying it above the field in a bright colour I think gets the point across well without altering the flow of the rest of the document with inserted content or bolded text. It gets more complicated if you have multiple errors at which point displaying multiple popovers is very cluttery, so you either decide to only display the first error or only display one error at a time and once one of the conflicts has been resolved display the next error. |
|||
|
|