title: cannot convert to object
body: <p>if i execute the following code i get a cannot convert to object error;
  Uncaught exception: TypeError: Cannot convert 'validation.messages.field' to object</p>
  
  <pre><code>$.fn.validate = function(validation) {
      $.each(validation.rules, function(field, fieldRules){
          $.each(fieldRules, function(rule, ruleValue){
              var fieldValue = $('[name=' + field + ']').val();
              if (eval(rule + '(fieldValue, ruleValue)') == false){
                  alert(validation.rules.field.rule);
                  return false;
              }else{
                  return true;
              };
          });
      });
  }
  </code></pre>
  
  <p>the problem is the </p>
  
  <p><code>alert(validation.messages.field.rule);</code></p>
  
  <p>'field' = 'persoon_voornaam' and 'rule' = 'required'
  and <code>validation.messages.persoon_voornaam.required</code> works just fine.</p>
  
  <p>What am i doing wrong?</p>
  
  <p>validation is a JSON that look like this:</p>
  
  <pre><code>{
      rules: {
          persoon_voornaam: {
              required: true, 
              minlength: 5,
          },
          postcode_bestemming: {
              required: true, 
              minlength: 7,
          },
      },
      messages: {
          persoon_voornaam: {
              required: 'Dit veld is verplicht',
              minlengt: 'Dit veld moet minstens 5 lang zijn', 
          },
      }
  }
  </code></pre>