I'm trying to validate user input on the front end to match the format of strings that oneSpan will accept for phone numbers. Is there any official documentation for this format?
June 19Created
January 21Last Updated
5 years agoLast Reply
6Replies
109Views
2Users
0Likes
0Links
Duo_Liang | Posts: 3776
Reply to: SMS Input validation
Wednesday, June 19, 2019 at 09:51am
0
votes
Hey rvardy,
Unfortunately, I didn't find anywhere it's officially documented, but from practice, the SMS Authentication format should be +{International_Access_Code}{area_code}{local_phone_number} (without space or dash in the middle) , for a North American phone number, it should be +1{3 digits area code}{7 digits local number} (+15145718888)
You can find a lot of JS plugin helping you do the digit checking, like the one used in this blog: OneSpan Sign Developer: SMS Authentication Plugin.
Hope this could help!
Duo
Hey Duo,
Do you know what the validations are for the other standard fields (first name, last name, and email)? It seems that the name fields accept a minimum of 2 characters, just wondering what other requirements must be met.
Cheers,
Rob
Hey rob,
From a quick test, I can create a signer with first name of 1 character. But if the length is longer than 64, the name will only take the first 64 digits.
For an email attribute, it should follow email address regular expression, otherwise a 400 error will be returned:
Hey Rob,
After some time of investigation, it looks like OneSpan Sign backend is using Apache Commons Validator 1.6 to validate user name, email address and email domain. (this explains why there's a max 64 chars limitation)
To be more exact, it's using org.apache.commons.validator.routines.EmailValidator.java class, source code here, which might be helpful to you.
As we discussed above, you can still rely on the OneSpan Sign server side to validate the email.
Hope this could help!
Duo
Reply to: SMS Input validation
Wednesday, June 19, 2019 at 09:51am+{International_Access_Code}{area_code}{local_phone_number}
(without space or dash in the middle) , for a North American phone number, it should be +1{3 digits area code}{7 digits local number} (+15145718888) You can find a lot of JS plugin helping you do the digit checking, like the one used in this blog: OneSpan Sign Developer: SMS Authentication Plugin. Hope this could help! DuoReply to: SMS Input validation
Tuesday, July 30, 2019 at 10:18amReply to: SMS Input validation
Tuesday, July 30, 2019 at 10:46amReply to: SMS Input validation
Thursday, August 8, 2019 at 06:07amReply to: SMS Input validation
Thursday, August 8, 2019 at 07:04amReply to: SMS Input validation
Thursday, August 8, 2019 at 07:48am