jquery validator add method code example
Example: jquery validator add method
jQuery.validator.addMethod("laxEmail", function(value, element) {
// allow any non-whitespace characters as the host part
return this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@(?:\S{1,63})$/.test( value );
}, 'Please enter a valid email address.');