What phone number validations occur when entering my number via the HR platform

Question

What phone number validations occur when entering my number via the HR platform?

Answer

Rule. Expected. Notes.
Max limit All regions 15 characters.  
Min limit All regions seven characters  

No Special Characters, including dash and the following symbols !@#$%^&*()_ -

All regions  
Space character in between.

 

All regions accept but clean up when saved to data-base.  
Allow international number format with '+' sign All regions  
No letters. All regions.  
Allows international number format '+'

Singapore International prefix rule: 0[0-3]\d → from 0 to 3 zeroes

 

Malaysia Country code: +60

International prefix: 00

National prefix: 0

Even if the organisation's country is not Singapore or Malaysia, it should still accept numbers not from org country
SG valid numbers

8[1-8]: 8 matches the character 8; then matches a single digit from [1-8]

9[0-8]: 9 matches the character 9; then matches a single digit from [0-8]

6 then matches 6 digits from [0-9]

 
MY valid numbers

1 is always the first digit, then either:

  • 1st alternative: 1[1-35]\d{2}
    • Start with 1, then match either (1, 2, 3, 5), then 2 single digits
  • 2nd alternative: [02-4679][2-9]\d
    • Match either (0, 2, 3, 4, 6, 7, 9), then a single digit from 2 → 9, then a single digit
  • 3rd alternative: 59\d{2}
    • Start with 59, then 2-single digits
  • 4th alternative: 8(?:1[23]|[2-9]\d)
    • Start with 8, then either:
      • 1st alternative: 1[23]
        • Start with 1, then either 2 or 3
      • 2nd alternative: [2-9]\d
        • Match a single digit from 2 → 9, then a single digit
  • Finally matches with 5-single digits
 
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.