# Format masked characters in phone number

**URL:** <https://community.auth0.com/t/format-masked-characters-in-phone-number/76424>\
**Category:** Get Help\
**Tags:** multi-factor-auth, guardian, mfa-sms, auth0\
**Created:** [January 14, 2022, 12:26pm UTC](https://community.auth0.com/t/format-masked-characters-in-phone-number/76424 "2022-01-14T12:26:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gagan.yadav](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gagan.yadav/32/34413_2.png) [@gagan.yadav](https://community.auth0.com/u/gagan.yadav)\
**Post date:** [January 14, 2022, 12:26pm UTC](https://community.auth0.com/t/format-masked-characters-in-phone-number/76424/1 "2022-01-14T12:26:26Z")

</div>

Hi, I have customized my MFA login page and by following [MFA theme language](https://auth0.com/docs/secure/multi-factor-authentication/customize-mfa/mfa-theme-language-dictionary) I have also customized the success message in case of sms sent like following:

```auto
successMessages: {
 smsSent: 'Enter the 6-digit verification code sent to {phoneNumber} as a text message.'
}

```

My concern is that it is displaying the masked phone number as XXXXXXXXX4049 along with the country code. Is there any way to limit it to 10 digits like XXXXXX4049 ,i.e., removing 3 masked characters?

![Screenshot_58](https://global.discourse-cdn.com/auth0/original/3X/8/a/8aa7b2955f9fad636a76b1b609725926abb3b027.png)

Thanks

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [January 14, 2022, 7:28pm UTC](https://community.auth0.com/t/format-masked-characters-in-phone-number/76424/3 "2022-01-14T19:28:56Z")

</div>

Hi @gagan.yadav,

Welcome to the Auth0 Community!

**It doesn’t appear possible.** I tried a few things, like using a template literal to manipulate it, i.e.

```auto
successMessages: {
  smsSent: `TEST: ${'{phoneNumber}'.substring(3)}`
}

```

Sadly, it appears this happens before the phone number is substituted.

---

<div class="post-metadata">

**Author:** ![gagan.yadav](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gagan.yadav/32/34413_2.png) [@gagan.yadav](https://community.auth0.com/u/gagan.yadav)\
**Post date:** [January 15, 2022, 6:04am UTC](https://community.auth0.com/t/format-masked-characters-in-phone-number/76424/4 "2022-01-15T06:04:51Z")

</div>

Thanks @dan.woda. I really appreciate the response.

---

<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:** [January 30, 2022, 6:05am UTC](https://community.auth0.com/t/format-masked-characters-in-phone-number/76424/5 "2022-01-30T06:05:47Z")

</div>

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