cindy | Posts: 380

SMS cell length

0 votes

When I create package via SDK, I got between errors:

1; when I set sms cellphone=64939837

"Create Package failed. E-SignLive Error: Could not create a new package in one-step Exception: HTTP POST on URI https://xxxx/api/packages resulted in response with status code: [400, Bad Request]. Optional details: {\"code\":400,\"messageKey\":\"error.validation.invalidPhoneNumber\",\"message\":\"TOO_SHORT\"}"

 

2: set sms cellphone=64689837129912897867

"errorMessage": "Create Package failed. E-SignLive Error: Could not create a new package in one-step Exception: HTTP POST on URI https://xxxx/api/packages resulted in response with status code: [400, Bad Request]. Optional details: {\"code\":400,\"messageKey\":\"error.validation.invalidPhoneNumber\",\"message\":\"The string supplied is too long to be a phone number.\"}"
  }

Could you please let me know what is the validation rule for sms cellphone?

Cindy


Duo_Liang | Posts: 3776

Reply to: SMS cell length

0 votes

Hi Cindy,

 

OneSpan Sign internally utilized third-party library to validate the SMS number, which will first use the first few digits to guess the country code, then check against the rest of the digits. So the best way to make sure custom application are on the same page with OneSpan Sign system, it's suggested always to add the country code up front to avoid letting the SMS validator to guess. (Just my assumption, the library will also check against the area code, if the country code is clear)

For a particular canadian number, the standard format is: starting with "1", following with 3 digits area code, then 7 digits number. If you input as "15141234567", (514 is montreal area code), no shorter or longer digits are acceptable.

 

Duo


Duo_Liang | Posts: 3776

Reply to: SMS cell length

0 votes

Hi Cindy,

 

The error validation depends on the third party library, and the error code was thrown from OneSpan Sign backend side.

 

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