3 ms·
Note that my post isn't limited to credit card inputs, nor do I say that the request for clarity is mandatory in all fields. What I'm advocating is a focus on
by fallous 7y ago
Note that my post isn't limited to credit card inputs, nor do I say that the request for clarity is mandatory in all fields.
What I'm advocating is a focus on ensuring the user's explicit intent rather than attempting to infer intent or making hidden assumptions that either could be wrong or exist to make things easier for the developer.
Too many times I've had to deal with data that someone optimistically sanitized or filtered client-side and then stored, only to discover the sanitizing/filtering rules were wrong and the original data provided by the user was lost because the only thing stored was the result of those rules.
- Dylan16807 7y ago> Note that my post isn't limited to credit card inputs Not your entire post, but the part about the '-' key was pretty specific and narrow-scoped. > What I'm advocating is a focus on ensuring the user's explicit intent rather than attempting to infer intent or making hidden assumptions that either could be wrong or exist to make things easier for the developer. 'explicit intent' sounds like a nice goal but asking the user inside the form is not going to give you good info, and it will very often annoy them. > only to discover the sanitizing/filtering rules were wrong and the original data provided by the user was lost because the only thing stored was the result of those rules It wouldn't hurt to store the original. Even if the user told you what they meant, they might have said the wrong thing.