No Letters Allowed!
by in CodeSOD on 2011-03-28"The data validation requirements for a telephone number are dead simple," writes Chris M., "Just the numbers and that's it. The user can enter their numbers with dashes, brackets, parens, whatever. Only the numbers should be saved."
"You would think that filtering out the non-numeric characters should be a simple thing to do with regluar expressions or heck, even walking the string would be feasible."