title: Forcing jQuery validator to validate a single element
body: <p>On an edit page, I am using <a href="http://jqueryvalidation.org/" rel="nofollow">http://jqueryvalidation.org/</a> to validate a form.</p>
  
  <pre><code>//validate object set using external file linked to page
  var myValidateObj = {
      "rules": {
          "foo": {"required": true,"maxlength": 45,"minlength": 2},
          "bar": {"maxlength": 45},
      },
      "messages": {
          "foo": {"required": "Foo is required.",},
          "bar": {"maxlength": "bla bla."},
      }
  };
  
  var validator=$("#myform").validate({
      rules: myValidateObj.rules,
      messages: myValidateObj.messages,
  });
  
  &lt;form id="myForm"&gt;
      Foo: &lt;input type="text" name="foo" /&gt;
      Bar: &lt;input type="text" name="bar" /&gt;
      &lt;input type="submit" value="SAVE"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>On another page, I am displaying the values of the previously described edit page, and allowing inline editing using <a href="http://vitalets.github.io/x-editable/" rel="nofollow">http://vitalets.github.io/x-editable/</a>.  The validation rules and messages still apply, but now are only needed to validate a single field.  Assuming the <code>myValidateObj</code> object exists on this page, can it be used to validate a single field?  For instance, within the editable validate callback, how can <code>myValidateObj</code> be used to validate <code>foo</code> and return the appropriate message upon not passing validation?</p>
  
  <pre><code>$('#foo').editable({
      type: 'text',
      validate: function(value) {
          //How do I use myValidateObj to validate foo and return applicable message???
      }
  });
  
  Name: &lt;a href="javascript:void(0)" id="foo"&gt;&lt;?php echo($foo); ?&gt;&lt;/a&gt;
  Bla: &lt;a href="javascript:void(0)" id="bar"&gt;&lt;?php echo($bar); ?&gt;&lt;/a&gt;
  </code></pre>