here is my textarea...
function validateForm() {
debugger
$('#form').validate({
ignore: [],
rules:{
editor1: {
required: function () {
CKEDITOR.instances.editor1.updateElement();
}
}
},
messages: {
Job_Title: "Required",
Job_Location: "Required",
jobid: "Required",
Job_Cat: "Required",
editor1: "Required"
},
/* use below section if required to place the error*/
errorPlacement: function (error, element) {
if (element.attr("name") == "editor1") {
error.insertBefore("textarea#editor1");
} else {
error.insertBefore(element);
}
}
});
var Title = document.getElementById('errortitle');
var title = document.getElementById('title');
if (title.value == '') {
errortitle.innerHTML = "The Title is required";
errortitle.focus();
return false;
}
else
{
errortitle.innerHTML = "";
}
var Company = document.getElementById('company');
var cerror = document.getElementById('errorcompany');
if (Company.value == '') {
errorcompany.innerHTML = "The companyname is required"
errorcompany.focus();
return false;
}
else
{
errorcompany.innerHTML = "";
}
var designation = document.getElementById('designation').value;
if(designation=="0")
{
errordesignation.innerHTML = "The Designation is required"
errordesignation.focus();
return false;
}
else
{
errordesignation.innerHTML = "";
}
var qualification = document.getElementById('qualification').value;
if (qualification == "0") {
errorqualification.innerHTML = "The Qualification is required"
errorqualification.focus();
return false;
}
else {
errorqualification.innerHTML = "";
}
var description = document.getElementById('editor1').length;
if (description <= 0) {
erroreditor1.innerHTML = "The Description is required";
erroreditor1.focus();
return false;
}
else {
erroreditor1.innerHTML = "";
}
var seokeywords = document.getElementById('seokeywords');
if (seokeywords.value == '') {
errorseokeywords.innerHTML = "The SeoKeywords is required";
errorseokeywords.focus();
return false;
}
else {
errorseokeywords.innerHTML = "";
}
var seokeytitle = document.getElementById('seokeytitle');
if (seokeytitle.value == '') {
errorseokeytitle.innerHTML = "The SeoKeyTitle is required";
errorseokeytitle.focus();
return false;
}
else {
errorseokeytitle.innerHTML = "";
}
var seodescription = document.getElementById('seodescription');
if (seodescription.value == '') {
errorseodescription.innerHTML = "The SeoDescription is required";
errorseodescription.focus();
return false;
}
else {
errorseodescription.innerHTML = "";
}
}