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

Maxlength Is nor working in RTE for touch UI

Level 2
Level 2

Hi team,

                I wanted to add  max length character for RTE in touch UI but it is not working.

I think this will be achieved by js .

does any one created js for such  type of  validation.

1 Reply
Level 2
Level 2

Hi @Bhuwan_B ,

                            I already tried but it is not working

Level 10
Level 10

Hi @savi50


Please try this.








(function($, window, document) {
    var registry = $(window).adaptTo("foundation-registry");
    registry.register("foundation.validation.validator", {
        selector: "[data-validation=rtemaxlenvalidation]",
        validate: function(el) {
            var element = $(el);
            var maxLen ='maxlength');
            var rteLen = element.text().trim().length;
            if (rteLen > maxLen) {
               return "Exceeded Maximum Limit";
($, window, document);