Hello, i m using joomla default editor for a form and jquery validator plugin, now i want to validate that joomla text editor should not be blank.... how do i validate that??
i read an article regarding validation for tinymce, i want similar to this post
although if i click on toggle editor than validation works( coz it turn into teaxarea) but when there is joomla default editor then does not display any error when it is blank
here is the reuired code
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("#addBookForm").validate({
rules: {
description: "required"
},
messages: {
description:"Please write description",
}
});
});
</script>
<form id="addBookForm" action="" method="post" >
<table width="100%" border="0" cellpadding="4" cellspacing="2">
<tr>
<td>Description :</td>
<td >
<?php
$editor =& JFactory::getEditor();
$params = array('smilies'=> '0' ,'style' => '0' ,'layer' => '0' ,'table' => '0' ,'clear_entities'=>'0');
$value = isset($this->data['description']) ? $this->data['description'] : '';
echo $editor->display('description', $value,'400','300','20','20',false, $params);
?>
</td>
</tr>
</table>
</form>