Add a custom validation method. It must consist of a name (must be a legal javascript identifier), a javascript based function and a default string message.
function addMethod(
name : String,
method : any,
message : String
) : Void;
Parameters
name
The name of the method, used to identify and referencing it, must be a valid javascript identifier
method
The actual method implementation, returning true if an element is valid. First argument: Current value. Second argument: Validated element. Third argument: Parameters.
message
The default message to display for this method. Can be a function created by jQuery.validator.format(value). When undefined, an already existing message is used (handy for localization), otherwise the field-specific messages have to be defined.