...

View Full Version : phone numer validation



dizyn
07-04-2007, 09:04 PM
i want to validate phone number like:

+92.3335240141

Philip M
07-04-2007, 10:25 PM
if (/\+\d{2}\.\d{10}/.test(phoneNumber.value)) { // valid

or if you mean the number must start with +92 (Pakistan) then

if (/\+92\.\d{10}/.test(phoneNumber.value)) {



You can test your regular expressions at: http://www.ogauge.co.uk/regextester.html

dizyn
07-05-2007, 09:25 AM
not Pakistan it could be anything any country may be USA like +1.xxxxx



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum