Knowledge Base
Published Jul. 2, 2025

Configuring Liferay to display CAPTCHA's with numbers only - 7.2

Written By

Ryan Snuggs

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How to articles!

While we make every effort to ensure this Knowledge Base is accurate,it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Issue

  • Configuring Liferay to display CAPTCHA's with numbers only instead of alphanumeric characters.

Environment

  • This issue affects Liferay 7.2

Resolution

  • While the default CAPTCHAs in Liferay generated by SimpleCaptcha contain alphanumeric combinations it is possible to configure them to only utilize numeric characters.
  • This can be done in System Settings using the following steps:
    1. Startup Liferay 7.2
    2. Navigate to Control Panel > Configuration > System Settings
    3. Under the Security section navigate to Security Tools.
    4. In Security Tools, replace all "Simple CAPTCHA Text Producers" (there should be 4 total) with the com.liferay.captcha.simplecaptcha.PinNumberTextProducer​ property.
    5. Sign out of Liferay.
    6. Navigate to "Sign In" and click on "Forgot Password."
    7. Observe that when you refresh the page, the CAPTCHA only requests numbers.
Did this article resolve your issue ?

Knowledge Base