Data validation best practices: how can I better construct user feedback?

Posted by Cory Larson on Stack Overflow See other posts from Stack Overflow or by Cory Larson
Published on 2010-12-31T20:38:04Z Indexed on 2010/12/31 23:54 UTC
Read the original article Hit count: 497

Data validation, whether it be domain object, form, or any other type of input validation, could theoretically be part of any development effort, no matter its size or complexity. I sometimes find myself writing informational or error messages that might seem harsh or demanding to unsuspecting users, and frankly I feel like there must be a better way to describe the validation problem to the user.

I know that this topic is subjective and argumentative. StackOverflow might not be the proper channel for diving into this subject, but like I've mentioned, we all run into this at some point or another. There are so many StackExchange sites now; if there is a better one, feel free to share!

Basically, I'm looking for good resources on data validation and user feedback that results from it at a theoretical level. Topics and questions I'm interested in are:

  1. Content
    • Should I be describing what the user did correctly or incorrectly, or simply what was expected?
    • How much detail can the user read before they get annoyed? (e.g. Is "Username cannot exceed 20 characters." enough, or should it be described more fully, such as "The username cannot be empty, and must be at least 6 characters but cannot exceed 30 characters."?)
  2. Grammar
    • How do I decide between phrases like "must not," "may not," or "cannot"?
  3. Delivery
    • This can depend on the project, but how should the information be delivered to the user?
    • Should it be obtrusive (e.g. JavaScript alerts) or friendly?
    • Should they be displayed prominently? Immediately (i.e. without confirmation steps, etc.)?
  4. Logging
    • Do you bother logging validation errors?
  5. Internationalization
    • Some cultures prefer or better understand directness over subtlety and vice-versa (e.g. "Don't do that!" vs. "Please check what you've done."). How do I cater to the majority of users?

I may edit this list as I think more about the topic, but I'm genuinely interest in proper user feedback techniques. I'm looking for things like research results, poll results, etc.

I've developed and refined my own techniques over the years that users seem to be okay with, but I work in an environment where the users prefer to adapt to what you give them over speaking up about things they don't like.

I'm interested in hearing your experiences in addition to any resources to which you may be able to point me.

© Stack Overflow or respective owner

Data validation best practices: how can I better construct user feedback?

Posted by Cory Larson on Programmers See other posts from Programmers or by Cory Larson
Published on 2010-12-31T21:18:18Z Indexed on 2010/12/31 21:59 UTC
Read the original article Hit count: 498

Data validation, whether it be domain object, form, or any other type of input validation, could theoretically be part of any development effort, no matter its size or complexity. I sometimes find myself writing informational or error messages that might seem harsh or demanding to unsuspecting users, and frankly I feel like there must be a better way to describe the validation problem to the user.

I know that this topic is subjective and argumentative. I've migrated this question from StackOverflow where I originally asked it with little response.

Basically, I'm looking for good resources on data validation and user feedback that results from it at a theoretical level. Topics and questions I'm interested in are:

  1. Content
    • Should I be describing what the user did correctly or incorrectly, or simply what was expected?
    • How much detail can the user read before they get annoyed? (e.g. Is "Username cannot exceed 20 characters." enough, or should it be described more fully, such as "The username cannot be empty, and must be at least 6 characters but cannot exceed 30 characters."?)
  2. Grammar
    • How do I decide between phrases like "must not," "may not," or "cannot"?
  3. Delivery
    • This can depend on the project, but how should the information be delivered to the user?
    • Should it be obtrusive (e.g. JavaScript alerts) or friendly?
    • Should they be displayed prominently? Immediately (i.e. without confirmation steps, etc.)?
  4. Logging
    • Do you bother logging validation errors?
  5. Internationalization
    • Some cultures prefer or better understand directness over subtlety and vice-versa (e.g. "Don't do that!" vs. "Please check what you've done."). How do I cater to the majority of users?

I may edit this list as I think more about the topic, but I'm genuinely interested in proper user feedback techniques. I'm looking for things like research results, poll results, etc.

I've developed and refined my own techniques over the years that users seem to be okay with, but I work in an environment where the users prefer to adapt to what you give them over speaking up about things they don't like.

I'm interested in hearing your experiences in addition to any resources to which you may be able to point me.

© Programmers or respective owner

Related posts about validation

Related posts about language-agnostic