how to use summernote minimum length validation

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. 

Last updated:9/11/2019 1:55:55 AM

1 Answers

Aditya Patel
Aditya Patel

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.

Answer