title: How to validate joomla 2.5 default text editor?
body: <p>how to validate joomla default text editor on blur using jQuery?</p>
  
  <p>This is the code what I used get text editor. Example, in /models/forms/newsitem.xml:</p>
  
  <pre><code>    &lt;field name="description" type="editor" buttons="true" 
                     hide="pagebreak,readmore,article,image"
                     class="inputbox required"
                     filter="JComponentHelper::filterText"
                     label="JGLOBAL_DESCRIPTION" 
                     description="COM_NEWSITEMS_FIELD_DESCRIPTION_DESC" required="true" /&gt;
  </code></pre>
  
  <p>And the second file (/views/.../edit.php) - What new object to add to the javascript?</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      Joomla.submitbutton = function(task) {
          if (task == 'newsitem.cancel' || document.formvalidator.isValid(document.id('newsitem-form'))) {
              &lt;?php echo $this-&gt;form-&gt;getField('description')-&gt;save(); ?&gt;
              Joomla.submitform(task, document.getElementById('newsitem-form'));
          } else {
              alert('&lt;?php echo $this-&gt;escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?&gt;');
          }
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>What I want is I want to show a warning message next to text editor saying "you can't leave this blank". I can do it in form submit but real challenge is how to do it on blur.</p>