Difference between revisions of "Phonenumber"
(Created page with '= '''PHONE NUMBER''' = <hr> <br> Structure of Phone Number in CatGlobe system: '''[country_number][area_code][number][extension]''' {| |- ! -RESOURCE ! -LAND LINE ! -MOBILE …') |
|||
Line 1: | Line 1: | ||
= '''PHONE NUMBER''' = | = '''PHONE NUMBER''' = | ||
− | + | ||
+ | ---- | ||
+ | |||
<br> Structure of Phone Number in CatGlobe system: '''[country_number][area_code][number][extension]''' | <br> Structure of Phone Number in CatGlobe system: '''[country_number][area_code][number][extension]''' | ||
Line 68: | Line 70: | ||
|} | |} | ||
− | ==Logic when Import, Update Phone number for User, Group: | + | == Logic when Import, Update Phone number for User, Group: == |
*By Phone number control in General Information of Resource CRD: | *By Phone number control in General Information of Resource CRD: | ||
Line 75: | Line 77: | ||
**If User input a invalid value, a little red text will be displayed under phone number control for notification. | **If User input a invalid value, a little red text will be displayed under phone number control for notification. | ||
*By Import User's Phonenumber (Import module): Validation Rule will be applied as normal. Phone number option must be selected. | *By Import User's Phonenumber (Import module): Validation Rule will be applied as normal. Phone number option must be selected. | ||
− | + | ||
− | ==Phone number Parser:== | + | ---- |
+ | |||
+ | == Phone number Parser: == | ||
+ | |||
Tools → Administration → System → Language and Culture Settings → Phone number parser tab | Tools → Administration → System → Language and Culture Settings → Phone number parser tab | ||
Revision as of 09:11, 6 August 2010
Contents
PHONE NUMBER
Structure of Phone Number in CatGlobe system: [country_number][area_code][number][extension]
-RESOURCE | -LAND LINE | -MOBILE |
---|---|---|
USER | NotIdentified = 0 | |
Mobile1 = 3 | ||
Home1 = 1 | ||
Mobile2 = 4 | ||
Home2 = 2 | ||
Business1 = 5 | ||
Business2 = 6 | ||
HomeFax = 7 | ||
BusinessFax =8 | ||
GROUP | Main1 = 9 | |
Main2 = 10 | ||
Fax1 = 11 | ||
Fax2 = 12 |
These value is defined in CatGlobe\Domain\PhoneNumbers\PhonenumberType.cs
Validation rule:
- All characters must be digits, from 0-9.*
- Mobile Types don't have [area_code] and [extension] [extension]: max length is 9 digits.
- If [country_number] isn't supported on XML file. Valid value must be from 6 to 14 digits.
- If [country_number] is supported, Using rules in XML file to decide which format phone numbers are legal for different countries. (Tools → Administration → System → Language and Culture Settings → Phone number parser tab).
- Valid phone number must satisfies all attributes belong to one of the available <possiblenumber> attributes.
[area_code] | Must followed rules specified by <area> attribute |
[number] | Must followed rules specified by <number> attribute |
Logic when Import, Update Phone number for User, Group:
- By Phone number control in General Information of Resource CRD:
- In PhoneType dropdown, The phone type have the exist value will be grey.
- If Phone number Label show in red and number field is empty, it means that this is invalid phone number exists on DB. After User corrected , It will be blue.
- If User input a invalid value, a little red text will be displayed under phone number control for notification.
- By Import User's Phonenumber (Import module): Validation Rule will be applied as normal. Phone number option must be selected.
Phone number Parser:
Tools → Administration → System → Language and Culture Settings → Phone number parser tab
- Download and Upload XML File used to validate phone number
- Path to locate XML file is specified by key "FilePath" in CatGlobeWeb\Web.config If there's any existing XML file in Path, Default file will be used (located at Catglobe\Domain\PhoneNumbers\Rule\default_rules.xml
- When uploading a phone rule, upload file must conform to the following things:
XML file. Must have date attribute. And this new value must >= old value, and <= current date Country code is pre-defined in system (hardcode) and There's no duplicate value. "Area" attribute only available for "Landline" phone type. Regexps provided are valid. Structure of XML file: <?xml version="1.0" encoding="utf-8"?> <Phonenumbers date="2008-04-16"> <country countrycode="31"> <mobile trunk="0" display="3-3-3"> <possiblenumber number="6\d{8}" numberdoc="6 followed by 8 digits"/> </mobile> <landline trunk="0" display="3-3-3"> <possiblenumber area="[1-5]0" areadoc="1 to 5 followed by a zero" number="\d{7}" numberdoc="7 digits"/> … <possiblenumber number="\d{9}" numberdoc="9 digits"/> </landline> <example>+31 703-333-333</example> <example>+31 561-123-456</example> </country> <country countrycode="32"> <mobile trunk="0" display="2-2-2-2"> <possiblenumber number="75\d{6}" numberdoc="75 followed by 6 digits"/> </mobile> <landline trunk="0" display="2-2-2"> <possiblenumber area="[239]" areadoc="2, 3 or 9" number="\d{7}" numberdoc="7 digits"/> …. <possiblenumber number="\d{8}" numberdoc="8 digits"/> </landline> <example>+32 61-12-23-34</example> <example>+32 19-00-11-00</example> </country> </Phonenumbers>