4 lines
186 B
JavaScript
4 lines
186 B
JavaScript
|
10 years ago
|
$.validator.addMethod("postalcodeNL", function(value, element) {
|
||
|
|
return this.optional(element) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(value);
|
||
|
|
}, "Please specify a valid postal code");
|