|
|
@@ -22,6 +22,7 @@
|
|
|
* - IT (Italy)
|
|
|
* - NL (Netherlands)
|
|
|
* - SE (Sweden)
|
|
|
+ * - SG (Singapore)
|
|
|
* @returns {Boolean}
|
|
|
*/
|
|
|
validate: function(validator, $field, options) {
|
|
|
@@ -43,6 +44,7 @@
|
|
|
case 'NL': return /^[1-9][0-9]{3} ?(?!sa|sd|ss)[a-z]{2}$/i.test(value);
|
|
|
|
|
|
case 'SE': return /^(S-)?\d{3}\s?\d{2}$/i.test(value);
|
|
|
+ case 'SG': return /^([0][1-9]|[1-6][0-9]|[7]([0-3]|[5-9])|[8][0-2])(\d{4})$/i.test(value);
|
|
|
case 'US':
|
|
|
default: return /^\d{4,5}([\-]\d{4})?$/.test(value);
|
|
|
}
|