Published on

Maxlength Module 2.0 Out Now - Set Character Limits on Your Drupal Website

In This Article
A text field with Maxlength enabled, showing a character countdown message.

Last year, we at DevCollaborative became maintainers of the Maxlength Drupal module. We use Maxlength on most of our clients’ websites to set character limits on key text fields to ensure concise messaging. 

As can happen with volunteer-run open-source projects, we noticed the module had several patches reviewed and tested by the community sitting idly in the issue queue. When we asked longtime Maxlength maintainer Daniel Wehner if we could help maintain the project, he quickly and graciously obliged.

Since then we’ve worked hard defining a vision for the project, triaging the issue queue, running usability tests and improving the module to make setting character limits an intuitive experience.

Maxlength 2.0 Is Here!

We’re excited to issue Maxlength’s first stable release for Drupal 8+. Maxlength 2.0 boasts a streamlined configuration process and more accurate character counting. 

Maxlength Configuration Before ( 1.0-RC3)

Maxlength settings in Maxlength 1.0, including number of rows, placeholder text, max number of characters, and count down message.


In our usability testing we found that site builders were consistently confused by the Force truncate and Safe truncate HTML options. Both use overly technical language. As a result, people often left the Safe truncate HTML option off on rich text fields,  leading to less accurate character counts. 

Maxlength Configuration After (2.0.0)

Settings for Maxlength 2.0 including number of rows, placeholder text, max number of characters, countdown message, and hard limit checkbox.


We moved the settings into a fieldset to keep the field’s configuration clean and reworded “Force truncate” to simply “Hard limit”. The “Safe truncate HTML” behavior is now applied on all rich text fields, saving site builders from an unnecessary configuration step. 

The result is a simple, easy to understand configuration process for setting character limits.

Additional Improvements

In addition to improving the configuration experience, we also 

Plus, site maintainers will benefit from the added security coverage and active maintenance that comes with a stable release.

Update from Maxlength 1.0-RC1 to 2.0

If you’re already using Maxlength, updating to 2.0 is a breeze. Any existing character limits on your site  will remain the same and you will benefit from more accurate character counts, security coverage, and future improvements such as a better hard limit behavior. 

Update to Maxlength 2.0 with Composer

If you manage contributed modules via Composer, update to Maxlength 2.0 by doing the following: 

  1. Update Composer.json to reference drupal/maxlength”: “^2.0”
  2. Run Composer update

Update to Maxlength 2.0 Manually

If you manage contributed modules manually, follow the Updating a Module - Using the Administrative Interface instructions on

A Big Thank You to the Drupal Community

All of this work would not have happened without the help of the greater Drupal community. As new maintainers, it was exciting to see so many people diving in alongside us to test, design, and develop the improvements; 35 people contributed to making Maxlength 2.0 a reality.

What’s Next for Maxlength

We’re continuing to improve Maxlength, with an eye in particular to making it Drupal 10 compatible. Since the 2.0 branch is the stable and actively maintained branch, Maxlength 1.0-RC3) will no longer be supported starting September 1, 2022. We encourage all Maxlength users to update to Maxlength 2.0 as soon as possible.

The major work for Drupal 10 compatibility is updating the code to work with CKEditor 5 and to no longer rely on jQuery. We will do this in a new major version, 3.0. Like the update from 1.0 to 2.0, we hope the update from 2.0 to 3.0 will also be seamless.

Modernizing Maxlength’s JavaScript will be a big undertaking. If you are a JavaScript developer and would like to help, contact us at hi@devcollaborative. We would love to collaborate (it’s in our name after all).

In the meantime, enjoy the new and improved Maxlength module and let us know how you like it!

Leave a comment

The content of this field is kept private and will not be shown publicly.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.