title: How to check whether a value already exists using AJAX in jQuery validator?
body: <pre><code>$.validator.addMethod("noanon", function(value) {
  return ajaxFunction();
  }, 'Username already exists.');
  </code></pre>
  
  <p>The addMethod function takes 3 arguments. A name, the logic to actually run, and lastly, the default message to use for failures. </p>
  
  <pre><code>name: {
   required: true,
   minlength: 2,
   noanon: true
  },
  </code></pre>
  
  <p>Now if I use the ajaxFunction, there sems to be some error which is appearing.</p>