Posted inTechnology / Ajax / JavaScript / jQuery

Validate CKEditor Fields Using JQuery validation

Today, We want to share with you Validate CKEditor Fields Using JQuery validation.In this post we will show you Validate CKEditor Using jQuery Validate, hear for bootstrap validation ckeditor textarea we will give you demo and example for implement.In this post, we will learn about Validate ckeditor using Jquery form validation with an example.

Validate CKEditor Fields Using JQuery validation

There are the Following The simple About Validate CKEditor Fields Using JQuery validation Full Information With Example and source code.

As I will cover this Post with live Working example to develop Validate CKEditor Fields Using JQuery, so the ckeditor html5 required,ckeditor jquery for this example is following below.

  • JQuery-2.2.4.js
  • JQuery.Validate.js
  • CKEditor.js

HTML Part

index.html




Validate ckeditor using Jquery form validation



Validate CKEditor Fields Using JQuery - Example

Script JS Files

$("#productDescfrm").validate({
    rules: {
        content: {
            required: true,
            minlength: 10
        }
    },
    messages: {
        content: "Enter Describe your issue here in details"
    },
    errorPlacement: function(error, element) {
        if (element.attr("id") == "content") {
            //element.parent('div').prev().append(error[0]);
            $(".ck_edior_error").append(error[0]);
        } else {
            error.insertAfter(element);
        }
    },
    submitHandler: function () {
        alert('successful Form submit');
    }
});

CKEDITOR.on('instanceReady', function () {
    $.each(CKEDITOR.instances, function (instance) {
        CKEDITOR.instances[instance].document.on("keyup", CK_jQ);
        CKEDITOR.instances[instance].document.on("paste", CK_jQ);
        CKEDITOR.instances[instance].document.on("keypress", CK_jQ);
        CKEDITOR.instances[instance].document.on("blur", CK_jQ);
        CKEDITOR.instances[instance].document.on("change", CK_jQ);
    });
});

function CK_jQ() {
    for (instance in CKEDITOR.instances) {
        CKEDITOR.instances[instance].updateElement();
    }
}
Validate ckeditor using Jquery form validation
Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Validate CKEditor Fields Using JQuery validation.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I'm a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.

Leave a Reply

Your email address will not be published. Required fields are marked *

We accept paid guest Posting on our Site : Guest Post Chat with Us On Skype