Hacker News new | ask | show | jobs
by nucleardog 4679 days ago
That's exactly what I do whenever I expect a number like this. For instance, phone numbers... Normalize them by replacing all non-numeric characters /then/ validate them. I can't imagine trying to validate the hundred different formatting variations for phone numbers.