title: Is there a way to make a custom rule in QuickForm2 the same way as it was done in QuickForm using addFormRule
body: <p>In QuickForm it could be done kind of like this:</p>
  
  <pre><code>$form = new HTML_QuickForm2('changepassword');
  
  $passwordold = $fs-&gt;addElement('password', 'oldpassword')-&gt;setLabel('Old password');
  
  function chkPass($fields)
  {
      if ((strlen($fields['oldpassword']) &amp;&amp; (md5($fields['oldpassword'])&lt;&gt;passwordcheck())))      
      {
          return array('oldpassword' =&gt; 'Old password does not match your records.');
      }
      return true;
  }
  
  $form-&gt;addFormRule('chkPass');
  </code></pre>
  
  <p>But QuickForm2 does not seem to have addFormRule(), is there anything replacing it?</p>