1.5 KiB
1.5 KiB
Input data properties
How could we describe data that we wish to validate and possibly sanitize differently, and present different experiences to end users for providing that data?
- What causes us to want to trim or prevent leading or trailing whitespace from some inputs?
- What causes us to limit the characters a field accepts?
- What sort of data would we want to sanitize or otherwise alter as we accept it (e.g. accepting but also sanitizing HTML to be stored as trusted HTML)?
Is there a good language for describing these categories of data, can we better understand what differentiates them, and use that knowledge to build more consistent guidelines for UX and input handling?
Trimmable
Use field trimming if:
- The leading or trailing white space is not needed for the business process.
- The input fields have uniquely identifying business objects.
- The input fields have a fixed field length.
Do not use field trimming if:
- The use case explicitly requires leading/trailing white space. For example, for formatted text such as chats, comments, descriptions, source code, or for file names (according to the supported OS behavior).
- For text areas where users would expect leading white space as a formatting tool.