# How to add 0 prefix on Universal login sms

**URL:** <https://community.auth0.com/t/how-to-add-0-prefix-on-universal-login-sms/70458>\
**Category:** Get Help\
**Tags:** auth0, login\
**Created:** [September 29, 2021, 4:15am UTC](https://community.auth0.com/t/how-to-add-0-prefix-on-universal-login-sms/70458 "2021-09-29T04:15:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hai.hoang1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/hai.hoang1/32/28936_2.png) [@hai.hoang1](https://community.auth0.com/u/hai.hoang1)\
**Post date:** [September 29, 2021, 4:15am UTC](https://community.auth0.com/t/how-to-add-0-prefix-on-universal-login-sms/70458/1 "2021-09-29T04:15:51Z")

</div>

![2021-09-29_10-49](https://global.discourse-cdn.com/auth0/original/3X/8/1/81c3fe6c4185968e840e3fb95a706a464a27917f.jpeg)

I want to add 0 prefix before my phone number, example: 0981\*\*\*, instead of 981\*\*\*  
Thank to help

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [September 29, 2021, 8:46pm UTC](https://community.auth0.com/t/how-to-add-0-prefix-on-universal-login-sms/70458/3 "2021-09-29T20:46:59Z")

</div>

Hi @hai.hoang1,

Welcome to the Auth0 Community!

I understand that you’d like to prepend a `0` into the phone number when a user starts a Passwordless authentication flow.

You can prepend a `0` before the phone number by using the `prefill` option in your Passwordless Universal Login Page: [https://auth0.com/docs/libraries/lock/lock-configuration#prefill-object-](https://auth0.com/docs/libraries/lock/lock-configuration#prefill-object-)

```auto
prefill: {
  phoneNumber: "0"
}

```

After doing so, the phone number field will begin with `0`. See below:

 ![image](https://global.discourse-cdn.com/auth0/original/3X/5/8/58cb147b7796fd9875f006dacebfa257712e140e.png)

Please let me know if there are any questions. I’d be happy to assist.

Thank you.

---

<div class="post-metadata">

**Author:** ![hai.hoang1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/hai.hoang1/32/28936_2.png) [@hai.hoang1](https://community.auth0.com/u/hai.hoang1)\
**Post date:** [September 30, 2021, 10:36am UTC](https://community.auth0.com/t/how-to-add-0-prefix-on-universal-login-sms/70458/4 "2021-09-30T10:36:11Z")

</div>

Sorry, but that is not my accepted.  
if user input 981\*\*\* in phone number input. Phone number will be +84981\*\*\* (valid phone number)  
if user input 0981\*\*\* in phone number input. Phone number will be +840981\*\*\* (invalid phone number)  
But normal user will input 0 in start off phone number.  
I wan’t to remove 0 at the start, when send request to auth0 server.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [September 30, 2021, 10:50pm UTC](https://community.auth0.com/t/how-to-add-0-prefix-on-universal-login-sms/70458/5 "2021-09-30T22:50:02Z")

</div>

Hi @hai.hoang1,

Thank you for your response.

Unfortunately, there is no way to manipulate the user’s inputted phone number before sending it to the Auth0 server. It is up to the user to submit a valid phone number to authenticate.

However, it may be worth trying to customize the error message to provide some guidance for the user to submit a valid phone number: See our documentation on customizing Lock Error Messages: [https://auth0.com/docs/brand-and-customize/customize-lock-error-messages](https://auth0.com/docs/brand-and-customize/customize-lock-error-messages)

Below is an example of how to accomplish a customized error message for invalid phone numbers during Passwordless login:

```auto
var lock = new Auth0LockPasswordless(config.clientID, config.auth0Domain, {
  languageDictionary: {
      passwordless: {
        'bad.phone_number': 'The phone number is invalid'
      },
  }
  ...
});

```

Hoped this helps! Please let me know if need further assistance, I would be happy to help.

Thank you.

---

<div class="post-metadata">

**Author:** ![hai.hoang1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/hai.hoang1/32/28936_2.png) [@hai.hoang1](https://community.auth0.com/u/hai.hoang1)\
**Post date:** [October 4, 2021, 3:41am UTC](https://community.auth0.com/t/how-to-add-0-prefix-on-universal-login-sms/70458/6 "2021-10-04T03:41:22Z")

</div>

Thank you for your 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:** [October 19, 2021, 3:41am UTC](https://community.auth0.com/t/how-to-add-0-prefix-on-universal-login-sms/70458/7 "2021-10-19T03:41:37Z")

</div>

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