# Customize error for wrong mobile number and otp in lock passwordless universal Login

**URL:** <https://community.auth0.com/t/customize-error-for-wrong-mobile-number-and-otp-in-lock-passwordless-universal-login/57864>\
**Category:** Get Help\
**Tags:** auth0\
**Created:** [February 15, 2021, 5:47am UTC](https://community.auth0.com/t/customize-error-for-wrong-mobile-number-and-otp-in-lock-passwordless-universal-login/57864 "2021-02-15T05:47:52Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [February 17, 2021, 8:02pm UTC](https://community.auth0.com/t/customize-error-for-wrong-mobile-number-and-otp-in-lock-passwordless-universal-login/57864/3 "2021-02-17T20:02:29Z")

</div>

Hi @ssharma,

Welcome to the Community!

You can customize the passwordless error messages like this:

```auto
    var languageDictionary = {
        error: {
          passwordless: {
           // User enters incorrect code
            invalid_user_password: 'That is not the code',
           // User does not enter code (i.e. leaves field blank)
            'bad.verification_code': 'No code provided',
            // invalid phone number
            'bad.phone_number': 'Please enter a valid phone number'
          }
        }
    };

```

You can update your lock code like so:

```auto
const config = JSON.parse(decodeURIComponent(escape(window.atob('@@config@@'))));
       config.extraParams = config.extraParams || {};
       const connection = config.connection;
       const prompt = config.prompt;
       var languageDictionary;
       var language;

       if (config.dict && config.dict.signin && config.dict.signin.title) {
           languageDictionary = { title: '' };
       } else if (typeof config.dict === 'string') {
           language = config.dict;
       }
       languageDictionary = Object.assign(languageDictionary, {
           "error": {
              passwordless: {
               // User enters incorrect code
                invalid_user_password: 'That is not the code',
               // User does not enter code (i.e. leaves field blank)
                'bad.verification_code': 'No code provided',
                // invalid phone number
                'bad.phone_number': 'Please enter a valid phone number!!!'
              }
           }
       })
       const loginHint = config.extraParams.login_hint;

       const lock = new Auth0LockPasswordless(config.clientID, config.auth0Domain, {
           auth: {
               redirectUrl: config.callbackURL,
               responseType: (config.internalOptions || {}).response_type ||
                   (config.callbackOnLocationHash ? 'token' : 'code'),
               params: config.internalOptions
           },
           configurationBaseUrl: config.clientConfigurationBaseUrl,
           overrides: {
               __tenant: config.auth0Tenant,
               __token_issuer: config.authorizationServer.issuer
           },
           assetsUrl: config.assetsUrl,
           allowedConnections: connection ? [connection] : null,
           rememberLastLogin: !prompt,
           language: language,
           languageDictionary: languageDictionary,
           theme: {
               logo: '"',
               primaryColor: '#8d1831'
           },
           closable: false
       });

       lock.show();

```

---

_[View the full topic](https://community.auth0.com/t/customize-error-for-wrong-mobile-number-and-otp-in-lock-passwordless-universal-login/57864)._
