mirror of
https://github.com/jquery-validation/jquery-validation.git
synced 2025-12-20 09:11:40 +01:00
Split out zipcodeUS
This commit is contained in:
committed by
Jörn Zaefferer
parent
f05f621156
commit
3153cfcd1a
@@ -33,10 +33,6 @@
|
||||
|
||||
}());
|
||||
|
||||
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");
|
||||
|
||||
jQuery.validator.addMethod("integer", function(value, element) {
|
||||
return this.optional(element) || /^-?\d+$/.test(value);
|
||||
}, "A positive or negative non-decimal number please");
|
||||
|
||||
Reference in New Issue
Block a user