Click here to Skip to main content
13,049,814 members (74,139 online)
Rate this:
Please Sign up or sign in to vote.
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).

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,

Posted 4-Dec-12 20:55pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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!?

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 5 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100