I am working with form validation, i have three fields (title,file,ckeditor),
validation is working only with “title and file” but whenever i try to validate “ckeditor” then
nothing is working for me,Here is my html code
<input type="text" class="form-control" name="title" id="title">
<input class="form-control validate[required]" type="file" id="file" name="file">
<textarea class="ckeditor" name="editor1" id="editor1"></textarea>
Here is my script code
<script>
$().ready(function() {
$("#addblog").validate({
rules: {
title: {
required: true
},
file: {
required: true
},
'editor1': {
required: required: function()
{
CKEDITOR.instances.cktext.updateElement();
}
},
messages: {
file: {
required: "Please enter your image"
}
},
ignore: [],
});
});
</script>