If you’re writing validation code, please never make it output “Incorrect foo” or “Invaid bar”. Pleeeaaase just tell me what I need to fix, and why it’s invalid.
-
-
It’s easy enough to go from, “Your X is invalid” to “Please enter an X with Y and Z.” But going from “This phone number is invalid” to “The area code must not begin with 1” can be much more difficult. One regex is used for to determine the validity of the phone number, but
-
determining what part of the regex failed requires additional regexes, each which must be documented, maintained, executed, and paired to a meaningful message.
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 