mirror of
https://github.com/jquery-validation/jquery-validation.git
synced 2025-12-24 12:13:59 +01:00
4 lines
182 B
JavaScript
4 lines
182 B
JavaScript
jQuery.validator.addMethod("zipcodeUS", function(value, element) {
|
|
return this.optional(element) || /^\d{5}-\d{4}$|^\d{5}$/.test(value);
|
|
}, "The specified US ZIP Code is invalid");
|