# phoneNumber Validation Error with standard SMS MFA Classic Universal Login

**URL:** <https://community.auth0.com/t/phonenumber-validation-error-with-standard-sms-mfa-classic-universal-login/108774>\
**Category:** Get Help\
**Tags:** mfa-prompt-classic-experience, mfa\
**Created:** [June 7, 2023, 4:41pm UTC](https://community.auth0.com/t/phonenumber-validation-error-with-standard-sms-mfa-classic-universal-login/108774 "2023-06-07T16:41:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryand1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ryand1/32/47893_2.png) [@ryand1](https://community.auth0.com/u/ryand1)\
**Post date:** [June 7, 2023, 4:41pm UTC](https://community.auth0.com/t/phonenumber-validation-error-with-standard-sms-mfa-classic-universal-login/108774/1 "2023-06-07T16:41:35Z")

</div>

Hello,

I am customizing our universal login experience at the moment but I recieve a validation error when I attempt to enroll a phone number into the SMS option we have enabled.

I built my own off of this base, but just to be sure I didn’t mess anything up, I switched my MFA template to use just the raw code from auth0 example page: [https://github.com/auth0/auth0-guardian.js/blob/master/example/basic\_widget.html](https://github.com/auth0/auth0-guardian.js/blob/master/example/basic_widget.html)

The phone number validation seems to not be passing the regex validation and I am not exactly sure how or why.

This is the payload being sent:

Hoping someone could shed some light on this for me.

---

<div class="post-metadata">

**Author:** ![ryand1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ryand1/32/47893_2.png) [@ryand1](https://community.auth0.com/u/ryand1)\
**Post date:** [June 7, 2023, 4:48pm UTC](https://community.auth0.com/t/phonenumber-validation-error-with-standard-sms-mfa-classic-universal-login/108774/2 "2023-06-07T16:48:24Z")

</div>

Accidentally hit send before finishing my post. This is the payload being sent to the sms-enroll endpoint:

```auto
{phone_number: '1234567890'}

```

Here is a test link to our app if you wanted to sign up to hit the MFA page:  
[edge-app.elevateqa.com](https://edge-app.elevateqa.com)

The example uses guardian-js.js 1.3.0 but I still get the same error with 1.3.3.

 ![Screen Shot 2023-06-07 at 9.46.23 AM](https://global.discourse-cdn.com/auth0/original/3X/0/e/0ea0af65dd0a2f9fb6b5c4fa2160b3b3d28d617d.png)  
 ![Screen Shot 2023-06-07 at 9.47.39 AM](https://global.discourse-cdn.com/auth0/original/3X/5/a/5a8501a443edc1db2a967d27d57fe9c84ab81e77.png)

---

<div class="post-metadata">

**Author:** ![ryand1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ryand1/32/47893_2.png) [@ryand1](https://community.auth0.com/u/ryand1)\
**Post date:** [June 7, 2023, 5:55pm UTC](https://community.auth0.com/t/phonenumber-validation-error-with-standard-sms-mfa-classic-universal-login/108774/3 "2023-06-07T17:55:54Z")

</div>

Solved my own question by just looking at the payload that comes from the default MFA widget.

Payload needs to include the country code it looks like.

`{phone_number: '+1 1234567890'}`

But obviously with a valid phone number. 🙂

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [June 21, 2023, 5:55pm UTC](https://community.auth0.com/t/phonenumber-validation-error-with-standard-sms-mfa-classic-universal-login/108774/4 "2023-06-21T17:55:57Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
