My site uses jquery input masking for phone numbers so the pattern is solved already. My pattern is (123) 456-7890
. Now, I'd like to filter bogus input like (000) 000-0000, (123) 456-7890 and such.
Is there any way to check whether the user input is really a phone number not a bogus/dummy one?
Have a look at good old PEAR: Validate_US
package. There is the function:
Validate_US::phoneNumber();
There is also Validate_CA
for Canada (and other contrys)