title: jQuery Validate plugin - don't evaluate empty fields
body: <p>I'm using the jQuery Validate plugin and what I'm trying to do should be relatively easy, but I can't get it to work. </p>
  
  <p>I've got an <code>input</code> field that is not a mandatory/required field. If nothing is entered into the field I don't want to run any form of validation on the field. If the form field changes and contains any input I want to validate it against, for example, numbers only, but if the field is blank, remove / don't validate.</p>
  
  <p>I tried doing something like this:</p>
  
  <pre><code>valForm('excessFrm');
  
  var vou = $('input[name="voucher"]');
  
  vou.blur(function(){
    if($(this).val() == ''){
      ( "#voucher" ).rules( "remove" );
    } else {
      ( "#voucher" ).rules( "add", {
          number: true
      });
    }
  })
  </code></pre>
  
  <p>But no matter where I put this in my code I'm getting this error:</p>
  
  <pre><code>Uncaught TypeError: Object #voucher has no method 'rules' 
  </code></pre>
  
  <p>Even though I'm sure the <code>validate()</code> object has been initiated, the <code>valForm()</code> function calls the validation object and setup all my default rules etc.</p>
  
  <p>Can anybody offer some words of wisdom please?</p>