how to use summernote minimum length validation

Total Post:290

Points:2072

ASP.Net  Mvc 
 633  View(s)
Ratings:
Rate this:

some time we need to minlength validation in input field then we set minlength value. but if i am useing  summernote editor then how to validation minlength. 

  1. Re: how to use summernote minimum length validation

    Please  read this example to solve  summernote minLength problem.

      $("#frmcontent").submit(function () {
          var  minLength     =100;
           var editorContent = $('#summernote').val();  
                var editorDecodeVal = deEncode(editorContent).trim();
                var contentMinLength = editorDecodeVal.length;
                if (contentMinLength < minLength) {
                   alert("Enter content minimum of " + minLength + " characters!!!");
                    return false;
                }
        });

    I hope it will help to you.

      Modified On Sep-11-2019 01:59:40 AM

Answer

Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.