Toggle menu
862
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

PHONE NUMBER


Structure of Phone Number in CatGlobe system:

[country_number][area_code][number][extension]

RESOURCE LAND LINE MOBILE
USER NotIdentified = 0
Home1 = 1 Mobile1 = 3
Home2 = 2 Mobile2 = 4
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:
  1. XML file.
  2. 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.
  3. "Area" attribute only available for "Landline" phone type (landline element)
  4. 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>