Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-04-2007, 08:04 PM   PM User | #1
dizyn
Regular Coder

 
Join Date: May 2006
Posts: 107
Thanks: 1
Thanked 0 Times in 0 Posts
dizyn has a little shameless behaviour in the past
phone numer validation

i want to validate phone number like:

+92.3335240141
dizyn is offline   Reply With Quote
Old 07-04-2007, 09:25 PM   PM User | #2
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,044
Thanks: 197
Thanked 2,412 Times in 2,390 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
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

Last edited by Philip M; 07-04-2007 at 09:38 PM..
Philip M is offline   Reply With Quote
Old 07-05-2007, 08:25 AM   PM User | #3
dizyn
Regular Coder

 
Join Date: May 2006
Posts: 107
Thanks: 1
Thanked 0 Times in 0 Posts
dizyn has a little shameless behaviour in the past
not Pakistan it could be anything any country may be USA like +1.xxxxx
dizyn is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:21 AM.


Advertisement
Log in to turn off these ads.