Anonymous (not verified) | Posts: 20

What is the validation logic for phone numbers entered for SMS verification?

0 votes

Hello - What is the logic behind validating the phone number entered in the SMS Authentication field?  How does the system know that 111-111-1111 is an incorrect number in America?  Thanks.


Duo_Liang | Posts: 3776

Reply to: What is the validation logic for phone numbers entered for SMS verification?

0 votes

Hi there,

 

First, it's suggested to use below format when input SMS string:

+{countryCode}{phoneNumber}

(dash in the middle is also acceptable)

 

The validation happens at OneSpan Sign backend if you are posting from SDK, a third-party library is used to validate the number. So assuming you are pass the string as "+1-111-111-1111", this is what will happen:
(1)OneSpan Sign system will pre-format your string and convert it to "+11111111111"

(2)The third party library analyze the number and try to find the country code, in this case is "+1"

(3)According to the country code, the library will analyze the rest part. The below steps involve the internal workings of the library, so it's just my own understanding:

    (3.1)Given the country code, check the length of the rest part, which is cheap

    (3.2)Then detect if the area code is available, in this case is "111" which doesn't exist I believe. You can try to use a real region code, like "201", will make the number pass the validation

(4)The library is not able to tell if it's a junky number or not. 

 

Duo

 

 

 


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off