Add customized password validation messages
We can customize the validations messages displayed to the user for providing details about password complexity.
We can add a key-value pair for validation messages in the tmsmesages.properties file. Key is the fully-qualified name of the custom password rule. Value is the validation message to the displayed.
- Modify the tmsMessages.properties/tmsMessages_en.properties file.
For example: examples.passwordrules.CustomRule= Password should contain "a" character.
- For languages other than English, also update the appropriate tmsmessages.properties file.
For example: If the language is French, then we also need to modify tmsmessages_fr.properties file.
- Save your changes.
- Restart the WebSphere Application Server.
Results
If no entry is found for the custom rule in tmsMessages.properties file, then the fully-qualified name is displayed as password validation message. Attention: After the installation of subsequent fix packs, all the custom validation messages are replaced. Before we install any Fix Pack, you must take a backup of any changes made to the tmsmessages.properties file and then re-do these changes after the Fix Pack installation.Parent topic: Customized password rules