jQueryvalidation器:使用addMethod添加的调用方法

我如何调用使用jQuery.validator创建的validate方法?

例:

jQuery.validator.addMethod("functionA", function(value, element) { if($.trim(value)==""){ return false; } return true; }, "MSG A"); jQuery.validator.addMethod("functionB", function(value, element) { return jQuery.functionA(); //<--- How do I do it? }, "MSG B"); 

使用addMethod添加的方法位于$.validator.methods对象中。 您可以像这样调用functionA

 jQuery.validator.addMethod("functionB", function(value, element) { return jQuery.validator.methods.functionA.call(this, value, element); }, "MSG B");