phone number regular expression problem

V

venu

Hi,
I have a different requirement and it is :

I need to validate a phone number field.
It may or may not be a US phone number.

The constraints are :
***********************

# It should accept any number of numbers
# any number of - hyphens
# and one + symbol
# no other characters and alphabets are allowed

Thanks in advance

Venugopal.S
 
R

RedGrittyBrick

venu said:
Hi,
I have a different requirement and it is :

I need to validate a phone number field.
It may or may not be a US phone number.

The constraints are :
***********************

# It should accept any number of numbers
# any number of - hyphens
# and one + symbol
# no other characters and alphabets are allowed

You mean the following are acceptable phone numbers:
"+"
"----------------------"
"12345+56789"
"203980234092-091234-0918234-982-34989834-09283-098349821-0394-219384-02918-092834-012983490"

but these are not:
"800 723 9374"
"(0234)23249"

nor this:
"08000 CONTACTS"

I've assumed you actually meant "zero or one + symbol".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top