PDA

View Full Version : Phone Number Validation



dchopda
01-27-2010, 05:47 AM
Hi,

I am looking for a javascript / jQuery code for phone number validation if the phone number has all 0’s in it.

If the value entered is only zeros, it should display the “Enter a valid value” message.

I want to prohibit 0, 00, 000000, 000-000-0000, 000.000.0000, etc. ( All possible phone number formats )

Can anyone help me in it?

Thanks,
Devesh

DomainsNow
01-27-2010, 06:46 AM
They have a JS and a PHP version..but that was a very long time ago

Try one of these links to see if it is what you need, you may have to use Reg Expressions though

http://www.codewalkers.com/c/a/Miscellaneous-Code/JavaScriptPHP-US-phone-number-validation/

http://www.dreamincode.net/code/snippet69.htm