This is a migrated thread and some comments may be shown as answers.

U.S. and International Phone numbers

2 Answers 358 Views
Input
This is a migrated thread and some comments may be shown as answers.
Larry Mrazek
Top achievements
Rank 1
Larry Mrazek asked on 11 Sep 2009, 01:15 PM
Hi folks:

I have an app that will be handling company directory information for U.S. and International entities. Right now, I'm a bit stuck on how to handle the different phone number formats.

Will RadInput Manager help, or should I simply create two separate fields (one for domestic phone, one for international), and try to use regular expressions to validate the input.

Thanks in advance for any help/hints/advice.

Larry

2 Answers, 1 is accepted

Sort by
0
ManniAT
Top achievements
Rank 2
answered on 14 Sep 2009, 07:30 PM
Hi Larry,

just a hint - no advice :)

InputManager can help you - but first (I guess) you must exactly know what you want.
How do you define intl phone numbers?

For us in Austria we have to formats
+43 732 xxxxxx    (Austria Country - +43 -- area code Linz 3 digits, number 3 to 6 digits and optional 1 to ?? internal line)
BUT
+43 01 xxxxxx (AT - vienna (leading zero is correct!!! 2 digits) the rest see above
AND
+43 5050 xxxxx (....organization predial 4 digits.....)
AND
+43 7235 xxxxxx (.....area code smaller villages....)

I gave up giving fixed patterns for this - to complex and still not ensuring that a correct number is given.
For an example area code 070 (or intl. +43 70 xxx) is Linz - but this is outdated and will be removed in the near future).

What I do instead - check for country code, check for legal characters (+ at the start; later - for internal line separation).

Regards
Manfred
0
Larry Mrazek
Top achievements
Rank 1
answered on 14 Sep 2009, 09:03 PM
Thanks Manfred:

Your hint makes perfect sense ... I don't want to over-complicate this relatively simple, app, but I still need to try to ensure data-quality as well.

Thanks again!

Larry
Tags
Input
Asked by
Larry Mrazek
Top achievements
Rank 1
Answers by
ManniAT
Top achievements
Rank 2
Larry Mrazek
Top achievements
Rank 1
Share this question
or