Take the 2-minute tour ×
User Experience Stack Exchange is a question and answer site for user experience researchers and experts. It's 100% free, no registration required.

I am performing date validation on several forms. This validation includes making sure a date does not fall on a weekend, does not fall on a major holiday, is at least 3 business days from the current date.

I currently display the error messages one at a time - if the date is on a weekend, I stop and return the message. If the date is not on a weekend, but is on a holiday, I stop and return the message. Etc., etc..

I visited a website the other day that validated several date scenarios at once, and returned the message.

I'm wondering what everyone thinks is the best way to display these errors - one at a time, or some combination.

  1. One at a time:

    • if the user selects a Saturday/Sunday:
      • "Please select a date that does not fall on a weekend"
    • if the user fixes it but selects a holiday, then:
      • "Please select a date that does not fall on a holiday"
    • if the user fixes it but selects tomorrow, then:
      • "Please select a date that is at least 3 business days from now"
  2. All at once:

    • if the user selects a weekend, a holiday, or tomorrow, then:

      • "Please select a date that does not fall on a weekend"
      • "Please select a date that does not fall on a holiday"
      • "Please select a date that is at least 3 business days from now"

        1. Some combination
    • if the user selects a Saturday/Sunday or a holiday:

      • "Please select a date that does not fall on a weekend"
      • "Please select a date that does not fall on a holiday"
    • if the user fixes it but selects tomorrow, then:
      • "Please select a date that is at least 3 business days from now"

FYI, simply not allowing certain values to be selected does not preclude the need for validation. Don't forget, someone could use something like TamperIE or Fiddler to manipulate the form post! Graying out dates does stop the problem client-side, but I still need server-side validation to handle the form values AFTER posting.

share|improve this question
1  
datepickers with disabled dates to prevent errors in the first place? –  Adrian Jun 6 '11 at 14:29
    
See my note in the question about datepicker option.... –  Eric Belair Jun 6 '11 at 15:30
    
Thanks to all for the great suggestions on the language of the error message. I'm definitely going to use your ideas. –  Eric Belair Jun 6 '11 at 15:33
1  
@Eric You're right, the technical reality of having to validate input on the server isn't really something that we should discuss in this question on UX. The rest of the question is fair game, though! –  Rahul Jun 6 '11 at 15:43
2  
"Don't forget, someone could use something like TamperIE or Fiddler to manipulate the form post!" Or they could just have JavaScript disabled. :-) I would worry about those people, but not the ones who intentionally manipulate the form post. For the latter, security trumps UX. –  Patrick McElhaney Jun 6 '11 at 16:05
show 1 more comment

4 Answers

Still Show Which Condition(s) Violated

Give a more informative error message:

"Dates should be at least 3 business days in the future and not holidays or weekends."

Put the relevant condition(s) violated in bold.

Datepicker?

Consider using a datepicker. That can make it much easier for them. Gray out the invalid dates.

share|improve this answer
add comment

I would show all the validation criteria at once to prevent the irritation of continually submitting the form until you meet some invisible criteria. Ideally this would be shown before a date is even entered

I would also highlight which of the criteria failed to make it clear exactly why it failed in this case, especially with such complicated criteria.

All that said, restricting the input using a date picker is an even better route.

share|improve this answer
    
+1 for restricting the input via date picker –  Jan Jun 6 '11 at 14:54
add comment

Displaying an error message

Ideally you want a combination of your #1 and #2 suggestions:

Please select a date that doesn't fall on a weekend or a holiday and is at least 3 business days from now.

The reason this is the best option is because this is what you would say to a person if they were standing next to you. A good rule of thumb for error copy, or any microcopy, is to first write it as you would say it and then fit it into the model you have. Since your model is an error message displayed when a user interacts with a form, it's perfectly possible to just print this sentence.

The hard part is making the sentence dynamic for various possible errors, but even that's not super hard if you know up front what can go wrong and what combinations of state the form can have.

Not having to display an error message in the first place

Now another approach you can take is asking yourself why you need to tell the user about these errors. What about the form is causing users to mistakenly fill them in? Why are you allowing these possibilities if they're not permitted by the business logic?

You can consider altering the controls available to the user so that they don't allow for situations that aren't valid. For instance, the date problem can be trivially fixed by using a calendar control. In the calendar control you could make weekends, holidays and days between now and three business days from now unselectable. That way the user would never have to face an error message in the first place. Remember to clearly communicate using copy why the calendar control disallows certain days.

share|improve this answer
1  
+1 for the second part, datepickers make life so much more easy for working with dates. –  Adrian Jun 6 '11 at 14:31
    
+1 for stopping it from happening in the first place. –  gef05 Jun 6 '11 at 14:45
1  
@Eric OK. Perhaps you should amend your question to indicate that constraint. :-) –  Rahul Jun 6 '11 at 15:27
2  
Datepicker is a great idea but doesn't preclude need for validation (see note in question). –  Eric Belair Jun 6 '11 at 15:32
2  
and be sure that your datepicker is tab-able, there are many out there that require a mouse, since having a text-box available defeats the great answers you've been given to allow your business criteria. –  Susan R Jun 6 '11 at 16:02
show 2 more comments

Consider a variation on your second option: "The date must be at least three days from now, on a weekday, and not on a holiday. Please select a new date." You should tell the user all the rules up front rather than making him fail multiple times for lack of information, but the repeated "please select"s makes it looks like you are calling for multiple actions.

(Personally I tend to skip "please correct" language; by not accepting the form and reporting a prominent error I think I've already conveyed that. But you didn't ask about that so I preserved the pattern in my answer.)

share|improve this answer
    
Thank you, the language of the errors is not set in stone, but I appreciate your input. –  Eric Belair Jun 6 '11 at 14:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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