|
@@ -11,6 +11,7 @@
|
|
|
IT: 'Italian postal code',
|
|
IT: 'Italian postal code',
|
|
|
MA: 'Moroccan postal code',
|
|
MA: 'Moroccan postal code',
|
|
|
NL: 'Dutch postal code',
|
|
NL: 'Dutch postal code',
|
|
|
|
|
+ RO: 'Romania Post Code',
|
|
|
SE: 'Swiss postal code',
|
|
SE: 'Swiss postal code',
|
|
|
SG: 'Singapore postal code',
|
|
SG: 'Singapore postal code',
|
|
|
US: 'US zip code'
|
|
US: 'US zip code'
|
|
@@ -23,7 +24,7 @@
|
|
|
country: 'country'
|
|
country: 'country'
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- COUNTRY_CODES: ['BR', 'CA', 'DK', 'GB', 'IT', 'MA', 'NL', 'SE', 'SG', 'US'],
|
|
|
|
|
|
|
+ COUNTRY_CODES: ['BR', 'CA', 'DK', 'GB', 'IT', 'MA', 'NL', 'RO', 'SE', 'SG', 'US'],
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Return true if and only if the input value is a valid country zip code
|
|
* Return true if and only if the input value is a valid country zip code
|
|
@@ -97,6 +98,10 @@
|
|
|
case 'NL':
|
|
case 'NL':
|
|
|
isValid = /^[1-9][0-9]{3} ?(?!sa|sd|ss)[a-z]{2}$/i.test(value);
|
|
isValid = /^[1-9][0-9]{3} ?(?!sa|sd|ss)[a-z]{2}$/i.test(value);
|
|
|
break;
|
|
break;
|
|
|
|
|
+
|
|
|
|
|
+ case 'RO':
|
|
|
|
|
+ isValid = /^(0[1-8]{1}|[1-9]{1}[0-5]{1})?[0-9]{4}$/i.test(value);
|
|
|
|
|
+ break;
|
|
|
|
|
|
|
|
case 'SE':
|
|
case 'SE':
|
|
|
isValid = /^(S-)?\d{3}\s?\d{2}$/i.test(value);
|
|
isValid = /^(S-)?\d{3}\s?\d{2}$/i.test(value);
|