Custom method must return a result instantly, and don't support callbacks as required for Ajax calls. For that, use the remote method: http://docs.jquery.com/Plugins/Validation/Methods/remote#url
Jörn On Tue, Mar 24, 2009 at 3:26 PM, Mr J <regis...@pharmeon.nl> wrote: > > dear all, > > i'm working with jQuery validation to validate the fields in a form. > in this form i have also the captcha (the check is verified through > ajax). > check the code below: > > jQuery.validator.addMethod("Captcha", > function(value, element) { > jQuery.get("/captcha.asp?validateCaptchaCode=" + jQuery > ("#captchacode").val() + "", function(data){ > if (data == 1) > { > result = true; > } > return true; > }); > return this.required(element) || true; > }); >