View Full Version : phone numer validation

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


Philip M
07-04-2007, 09: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

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