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-31T20:38:04Z
Indexed on
2011/01/02
7:58 UTC
Read the original article
Hit count: 436
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:
- 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."?)
- Grammar
- How do I decide between phrases like "must not," "may not," or "cannot"?
- 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.)?
- Logging
- Do you bother logging validation errors?
- 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.
© Programmers or respective owner