---
updatedAt: 2026-04-20T19:47:10.000Z
---

# Modify the "Password is not acceptable" error message

To modify the error message displayed when a user attempts to reuse a password you need to change (or add) the error message to all the forms where users are allowed to change their password; for example, if you’re using Hosted Login that means you’ll need to modify the forms <strong>changePasswordForm </strong>and <strong>changePasswordNoAuthForm</strong>. In this walkthrough, we’ll work with the <strong>changePasswordNoAuthForm </strong>form, and assume that the <strong>passwordUnacceptable </strong>validation rule hasn’t been added to the form yet.

Note that your existing forms (and flows) might already include this validation rule, even if those forms and flows were created before the password history feature was released. That's because the password history elements have been added to the default Identity Cloud flow, which means that, at the very least. your Hosted Login flows should automatically begin using those elements. (Hosted Login is designed to use core flow elements from a master flow if those core elements can't be found in the current flow.) You can verify the existence of the <strong>passwordUnacceptable</strong> validation rule by returning the property values of the form and looking for a section similar to this:

[block:code]
{
  "codes": [
    {
      "code": "\"validation\": [\n    {\n      \"rule\": \"passwordUnacceptable\",\n      \"message\": \"a90e78fc1784c0e8bcdb163a9eee4020\"\n    }\n  ]",
      "language": "json"
    }
  ]
}
[/block]

If the validation rule already exists then that rule doesn't need to be added to the form. In addition, you can change the text of that flow by using the [/translations](https://techdocs.akamai.com/identity-cloud-config/reference/patch-translations) operation to modify the translation specified by the <strong>message </strong>property (in the preceding example, that's the translation with the key ID <strong>a90e78fc1784c0e8bcdb163a9eee4020</strong>. <br>

# Step 1: Return the current properties and property values of the form

To add the validation rule to a form, use the [/forms](https://techdocs.akamai.com/identity-cloud-config/reference/get-form) operation and the GET method to return the current properties of that form. The following Curl command does just that:

[block:code]
{
  "codes": [
    {
      "code": "curl -L -X GET \\\n  'https://v1.api.us.janrain.com/config/79y4mqf2rt3bxs378kw5479xdu/flows/new-test-flow/forms/changePasswordNoAuthForm' \\\n  -H 'Authorization: Basic eTR4Zmc2ZjQ0bXNhYzN2ZXBqanZ4Z2d6dnQzZTNzazk6OTVjY3hrN2N6YnZ1eng2ZHB0ZTVrOXA2ZGo1Ynpla3U='",
      "language": "curl"
    }
  ]
}
[/block]

In return, you’ll get an API response similar to the following:

[block:code]
{
  "codes": [
    {
      "code": "\"action\": \"profileUpdate\",\n    \"fields\": [\n        {\n            \"_self\": \"/config/79y4mqf2rt3bxs378kw5479xdu/flows/new-test-flow/fields/newPassword\",\n            \"name\": \"newPassword\",\n            \"required\": true\n        },\n        {\n            \"_self\": \"/config/79y4mqf2rt3bxs378kw5479xdu/flows/new-test-flow/fields/\nnewPasswordConfirm\",\n            \"name\": \"newPasswordConfirm\",\n            \"required\": false\n        }\n    ],\n    \"next\": {\n        \"sendMail\": {\n            \"mail\": \"passwordChanged\"\n        },\n        \"type\": \"server\"\n    },\n    \"_self\": \"/config/79y4mqf2rt3bxs378kw5479xdu/flows/new-test-flow/forms/changePasswordNoAuthForm\"\n}",
      "language": "json"
    }
  ]
}
[/block]

You’ll need to copy this response and use it in Step 2.

<br>

# Step 2: Add a validation rule to the form

The next step is to add the <strong>passwordUnacceptable</strong> validation rule to the form. By default, that rule looks like this: 

[block:code]
{
  "codes": [
    {
      "code": "\"validation\": [\n    {\n      \"rule\": \"passwordUnacceptable\",\n      \"message\": \"This password is unacceptable. Select a different password.\"\n    }\n  ]",
      "language": "json"
    }
  ]
}
[/block]

As you can see, the validation includes two parts:

* The <strong>rule</strong> indicates the validation rule used to check the data input. In this case, that’s the <strong>passwordUnacceptable</strong> rule.

* The <strong>message </strong>specifies the text displayed if validation fails. In the preceding example, that’s the default message <strong>The password is unacceptable. Select a different password.</strong>

If you don’t like the default message that accompanies the <strong>passwordUnacceptable</strong> rule you can change it before making your API call:

[block:code]
{
  "codes": [
    {
      "code": "\"validation\": [\n    {\n      \"rule\": \"passwordUnacceptable\",\n      \"message\": \"You’ve already used this password. Please select a different password.\"\n    }\n  ]",
      "language": "json"
    }
  ]
}
[/block]

When you make that API call, you’ll use the /[forms/{form}](https://techdocs.akamai.com/identity-cloud-config/reference/put-form) operation and the PUT method. In addition, you’ll also need to:

* Configure the request body of the API call to use JSON format.

* Paste in the current properties and property values of the form, the same properties and property values you copied in Step 1.

* Add the **passwordUnacceptable** validation rule to the request body.

A complete Curl command for adding the validation rule to a form will look similar to this:

[block:code]
{
  "codes": [
    {
      "code": "curl -L -X PUT \\\n  'https://v1.api.us.janrain.com/config/79y4mqf2rt3bxs378kw5479xdu/flows/new-test-flow/forms/changePasswordNoAuthForm' \\\n  -H 'Authorization: Basic eTR4Zmc2ZjQ0bXNhYzN2ZXBqanZ4Z2d6dnQzZTNzazk6OTVjY3hrN2N6YnZ1eng2ZH>B0ZTVrOXA2ZGo1Ynpla3U=' \\\n  -H 'Content-Type: application/json' \\\n  --data-raw '{\n    \"action\": \"profileUpdate\",\n    \"fields\": [\n        {\n            \"name\": \"newPassword\",\n            \"required\": true\n        },\n        {\n            \"name\": \"newPasswordConfirm\",\n            \"required\": false\n        }\n    ],\n    \"next\": {\n        \"sendMail\": {\n            \"mail\": \"passwordChanged\"\n        },\n        \"type\": \"server\"\n    },\n    \"validation\": [\n        {\n            \"rule\": \"passwordUnacceptable\",\n            \"message\": \"You’ve already used this password. Please select a different password.\"\n        }\n    ]\n}'",
      "language": "curl",
      "name": null
    }
  ]
}
[/block]

If your API call succeeds, you’ll get the HTTP response <strong>204 No Content</strong>. If you then call the GET method to view the updated properties of the form, you should see the new validation rule

[block:code]
{
  "codes": [
    {
      "code": "{\n    \"action\": \"profileUpdate\",\n    \"fields\": [\n        {\n            \"self\": \"/config/79y4mqf2rt3bxs378kw5479xdu/flows/new-test-flow/fields/newPassword\",\n            \"name\": \"newPassword\",\n            \"required\": true\n        },\n        {\n            \"self\": \"/config/79y4mqf2rt3bxs378kw5479xdu/flows/new-test-flow/fields/newPasswordConfirm\",\n            \"name\": \"newPasswordConfirm\",\n            \"required\": false\n        }\n    ],\n    \"next\": {\n        \"sendMail\": {\n            \"mail\": \"passwordChanged\"\n        },\n        \"type\": \"server\"\n    },\n    \"validation\": [\n        {\n            \"rule\": \"passwordUnacceptable\",\n            \"message\": \"a90e78fc1784c0e8bcdb163a9eee4020\"\n        }\n    ],\n    \"self\": \"/config/79y4mqf2rt3bxs378kw5479xdu/flows/new-test-flow/forms/changePasswordNoAuthForm\"\n}",
      "language": "json"
    }
  ]
}
[/block]

As you might have noticed, in the API response the message text has been replaced by an ID: <strong>a90e78fc1784c0e8bcdb163a9eee4020</strong>. As we alluded to earlier, the ID is actually a translation containing the message text. That means you can use a Curl command similar to this to view that translation (and the message text):

[block:code]
{
  "codes": [
    {
      "code": "curl -L -X GET \\\n  'https://v1.api.us.janrain.com/config/79y4mqf2rt3bxs378kw5479xdu/flows/new-test-flow/translations/a90e78fc1784c0e8bcdb163a9eee4020'\\\n  -H 'Authorization: Basic eTR4Zmc2ZjQ0bXNhYzN2ZXBqanZ4Z2d6dnQzZTNzazk6OTVjY3hrN2N6YnZ1eng2ZHB0ZTVrOXA2ZGo1Ynpla3U=' </code></pre><p>That returns information similar to the following:</p><pre><code data-language=\"json\">{\n    \"key\": \"a90e78fc1784c0e8bcdb163a9eee4020\",\n    \"path\": \"fields.changePasswordNoAuthForm.messages.errors.passwordUnacceptable\",\n    \"values\": {\n        \"en-US\": \"You’ve already used this password. Please select a different password.\"\n    },\n    \"self\": \"/config/79y4mqf2rt3bxs378kw5479xdu/flows/new-test-flow/translations/a90e78fc1784c0e8bcdb163a9eee4020\"\n}",
      "language": "curl"
    }
  ]
}
[/block]

From now on you can change the <strong>passwordUnacceptable</strong> text anytime you want simply by changing the value of the <strong>a90e78fc1784c0e8bcdb163a9eee4020</strong> translation key.

# Sibling pages

* [Configure unique password enforcement](https://techdocs.akamai.com/identity-cloud/docs/configure-unique-password-enforcement-and-password-history.md)
* [Unique password enforcement cheatsheets](https://techdocs.akamai.com/identity-cloud/docs/unique-password-enforcement-cheatsheet.md)