Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

AEM RichText Max Characters Length Validation | AEM Community Blog Seeding




AEM RichText Max Characters Length Validation by sourcedcode


In this article, we will take a look at how we can add max character length validation to the richtext component, cq/gui/components/authoring/dialog/richtext, by introducing a maxlength attribute. The validation will be executed whenever AEM authors try to save or perform an on-key-up action after applying changes within the richtext input field. After implementing the solution, all richtext components within the installed AEM author environment will have this feature enabled.

// to enable the max character limit, simply include the "maxlength" attribute


We will be solving this problem by registering a new validator (foundation.validation.validator) to the foundation-registry (the foundation-registry is used in the Granite UI framework). In this solution we will be utilising the jQuery Validation library (the validation library used by Granite UI is achieved by using jQuery Validation plugin). A new client library will be introduced to inject JavaScript into our context page, and to execute the registry and scripts.

Read Full Blog

AEM RichText Max Characters Length Validation


Please use this thread to ask the related questions.


Topics help categorize Community content and increase your ability to discover relevant content.

0 Replies