Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,

I am developing an application using prime faces where i use contact form in that which consists of mobile and telephone numbers..

Here the sample for telephone are as follows:
(country-code).(state-code)(telephone number).
(+91).(80).(4465444)..

Where in India country code is same , but state code differs form each..can any one help in validating a number for state code in telephone field..

Example state-codes,080,04545,0452
Awaiting a reply..

Thanks in advance,

Siva
Posted

1 solution

You already said it - validation is the key.
You need to check the entered value before you use/store it.
If the value is a valid number it's ok. Otherwise react.

State codes are fixed values. They don't change. So it's pretty simple to compare them.
Comparing a number should not be a big deal!?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900