jQuery.validator.methods

Description: Object holding all validation methods known to the validator. This can be accessed to override individual methods, while keeping the default messages.

    Example:

    Sets a custom email pattern for the built-in email validation rule.

    1
    2
    3
    $.validator.methods.email = function( value, element ) {
    return this.optional( element ) || /[a-z]+@[a-z]+\.[a-z]+/.test( value );
    }