I’ve found a couple out there – but not to the extent in which I want..
I want to be able to match: 1-(817)-555-1212 (817)-555-1212 1-817-555-1212 [817] 555 1212 817x555x1212 817.555.1212 …. and the rest of the mix and match of -‘s,.’s, [‘s, (‘s, x’s, etc..
@ellisglauthorAug 08.2007 — #Not everyone is going to have javascript turned on. So validating the phone number on the server side has to be done. Even if everyone in the world had it turned on - I still would do it server side to make absolutely sure the input is clean before passing it to the DB.
Here's my two cents. The only thing important about a telephone number is the digits so just remove the rest. Once you have just the digits it is so much easier to decide if the number is valid or not.