Skip to content

Commit 2124adf

Browse files
committed
fix(next): stricter postal code validation for romania
Because: - Our postal code validation for romanian postal codes was too permissive This commit: - Increases the strictness of our postal code validation for romania Closes FXA-11482
1 parent 9a9942c commit 2124adf

1 file changed

Lines changed: 47 additions & 47 deletions

File tree

libs/google/src/lib/google.constants.ts

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -3,51 +3,51 @@
33
* Romanian postal codes. This page provides a reference list: https://en.wikipedia.org/wiki/Postal_codes_in_Romania
44
*/
55
export const ROMANIAN_POSTAL_CODES = [
6-
/01\d{4}/, // Bucharest Sector 1
7-
/02\d{4}/, // Bucharest Sector 2
8-
/03\d{4}/, // Bucharest Sector 3
9-
/04\d{4}/, // Bucharest Sector 4
10-
/05\d{4}/, // Bucharest Sector 5
11-
/06\d{4}/, // Bucharest Sector 6
12-
/07\d{4}/, // Ilfov County
13-
/08\d{4}/, // Giurgiu County
14-
/10\d{4}/, // Prahova County
15-
/11\d{4}/, // Argeș County
16-
/12\d{4}/, // Buzău County
17-
/13\d{4}/, // Dâmbovița County
18-
/14\d{4}/, // Teleorman County
19-
/20\d{4}/, // Dolj County
20-
/21\d{4}/, // Gorj County
21-
/22\d{4}/, // Mehedinți County
22-
/23\d{4}/, // Olt County
23-
/24\d{4}/, // Vâlcea County
24-
/30\d{4}/, // Timiș County
25-
/31\d{4}/, // Arad County
26-
/32\d{4}/, // Caraș-Severin County
27-
/33\d{4}/, // Hunedoara County
28-
/40\d{4}/, // Cluj County
29-
/41\d{4}/, // Bihor County
30-
/42\d{4}/, // Bistrița-Năsăud County
31-
/43\d{4}/, // Maramureș County
32-
/44\d{4}/, // Satu Mare County
33-
/45\d{4}/, // Sălaj County
34-
/50\d{4}/, // Brașov County
35-
/51\d{4}/, // Alba County
36-
/52\d{4}/, // Covasna County
37-
/53\d{4}/, // Harghita County
38-
/54\d{4}/, // Mureș County
39-
/55\d{4}/, // Sibiu County
40-
/60\d{4}/, // Bacău County
41-
/61\d{4}/, // Neamț County
42-
/62\d{4}/, // Vrancea County
43-
/70\d{4}/, // Iași County
44-
/71\d{4}/, // Botoșani County
45-
/72\d{4}/, // Suceava County
46-
/73\d{4}/, // Vaslui County
47-
/80\d{4}/, // Galați County
48-
/81\d{4}/, // Brăila County
49-
/82\d{4}/, // Tulcea County
50-
/90\d{4}/, // Constanța County
51-
/91\d{4}/, // Călărași County
52-
/92\d{4}/, // Ialomița County
6+
/^01\d{4}$/, // Bucharest Sector 1
7+
/^02\d{4}$/, // Bucharest Sector 2
8+
/^03\d{4}$/, // Bucharest Sector 3
9+
/^04\d{4}$/, // Bucharest Sector 4
10+
/^05\d{4}$/, // Bucharest Sector 5
11+
/^06\d{4}$/, // Bucharest Sector 6
12+
/^07\d{4}$/, // Ilfov County
13+
/^08\d{4}$/, // Giurgiu County
14+
/^10\d{4}$/, // Prahova County
15+
/^11\d{4}$/, // Argeș County
16+
/^12\d{4}$/, // Buzău County
17+
/^13\d{4}$/, // Dâmbovița County
18+
/^14\d{4}$/, // Teleorman County
19+
/^20\d{4}$/, // Dolj County
20+
/^21\d{4}$/, // Gorj County
21+
/^22\d{4}$/, // Mehedinți County
22+
/^23\d{4}$/, // Olt County
23+
/^24\d{4}$/, // Vâlcea County
24+
/^30\d{4}$/, // Timiș County
25+
/^31\d{4}$/, // Arad County
26+
/^32\d{4}$/, // Caraș-Severin County
27+
/^33\d{4}$/, // Hunedoara County
28+
/^40\d{4}$/, // Cluj County
29+
/^41\d{4}$/, // Bihor County
30+
/^42\d{4}$/, // Bistrița-Năsăud County
31+
/^43\d{4}$/, // Maramureș County
32+
/^44\d{4}$/, // Satu Mare County
33+
/^45\d{4}$/, // Sălaj County
34+
/^50\d{4}$/, // Brașov County
35+
/^51\d{4}$/, // Alba County
36+
/^52\d{4}$/, // Covasna County
37+
/^53\d{4}$/, // Harghita County
38+
/^54\d{4}$/, // Mureș County
39+
/^55\d{4}$/, // Sibiu County
40+
/^60\d{4}$/, // Bacău County
41+
/^61\d{4}$/, // Neamț County
42+
/^62\d{4}$/, // Vrancea County
43+
/^70\d{4}$/, // Iași County
44+
/^71\d{4}$/, // Botoșani County
45+
/^72\d{4}$/, // Suceava County
46+
/^73\d{4}$/, // Vaslui County
47+
/^80\d{4}$/, // Galați County
48+
/^81\d{4}$/, // Brăila County
49+
/^82\d{4}$/, // Tulcea County
50+
/^90\d{4}$/, // Constanța County
51+
/^91\d{4}$/, // Călărași County
52+
/^92\d{4}$/, // Ialomița County
5353
];

0 commit comments

Comments
 (0)