Skip to content

Commit

Permalink
Added missing countries
Browse files Browse the repository at this point in the history
  • Loading branch information
mnestorov authored Aug 21, 2024
1 parent e0e156f commit ae01759
Showing 1 changed file with 66 additions and 3 deletions.
69 changes: 66 additions & 3 deletions patterns.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,28 @@
"Finland": "^\\+358[1-9][0-9]{4,11}$",
"France": "^\\+33[1-9][0-9]{8}$",
"Germany": "^\\+49[1-9][0-9]{1,14}$",
"Italy": "^\\+39[0-9]{6,12}$"
"Italy": "^\\+39[0-9]{6,12}$",
"Latvia": "^\\+371[2-9][0-9]{7}$",
"Liechtenstein": "^\\+423[0-9]{3,12}$",
"Lithuania": "^\\+370[6-9][0-9]{7}$",
"Luxembourg": "^\\+352[0-9]{3,11}$",
"Malta": "^\\+356[0-9]{8}$",
"Montenegro": "^\\+382[6-9][0-9]{6,7}$",
"Monaco": "^\\+377[0-9]{8,9}$",
"Netherlands": "^\\+31[0-9]{9}$",
"North Macedonia": "^\\+389[2-9][0-9]{6,7}$",
"Norway": "^\\+47[2-9][0-9]{7,8}$",
"Poland": "^\\+48[0-9]{9}$",
"Portugal": "^\\+351[1-9][0-9]{8}$",
"Romania": "^\\+40[1-9][0-9]{8,9}$",
"San Marino": "^\\+378[0-9]{6,10}$",
"Serbia": "^\\+381[6-9][0-9]{6,8}$",
"Slovakia": "^\\+421[1-9][0-9]{8}$",
"Slovenia": "^\\+386[1-9][0-9]{6,7}$",
"Spain": "^\\+34[6-9][0-9]{8}$",
"Sweden": "^\\+46[0-9]{7,13}$",
"Switzerland": "^\\+41[1-9][0-9]{8}$",
"United Kingdom": "^\\+44[1-9][0-9]{9,10}$"
},
"postalCodes": {
"Andorra": "^AD\\d{3}$",
Expand All @@ -30,7 +51,28 @@
"Finland": "^\\d{5}$",
"France": "^\\d{5}$",
"Germany": "^\\d{5}$",
"Italy": "^\\d{5}$"
"Italy": "^\\d{5}$",
"Latvia": "^LV-\\d{4}$",
"Liechtenstein": "^\\d{4}$",
"Lithuania": "^LT-\\d{5}$",
"Luxembourg": "^\\d{4}$",
"Malta": "^[A-Z]{3}\\s?\\d{2,4}$",
"Montenegro": "^\\d{5}$",
"Monaco": "^980\\d{2}$",
"Netherlands": "^[1-9][0-9]{3}\\s?[A-Z]{2}$",
"North Macedonia": "^\\d{4}$",
"Norway": "^\\d{4}$",
"Poland": "^\\d{2}-\\d{3}$",
"Portugal": "^\\d{4}-\\d{3}$",
"Romania": "^\\d{6}$",
"San Marino": "^4789\\d$",
"Serbia": "^\\d{5}$",
"Slovakia": "^\\d{3}\\s?\\d{2}$",
"Slovenia": "^\\d{4}$",
"Spain": "^(?:0[1-9]|[1-4]\\d|5[0-2])\\d{3}$",
"Sweden": "^\\d{3}\\s?\\d{2}$",
"Switzerland": "^\\d{4}$",
"United Kingdom": "^(GIR ?0AA|[A-Z]{1,2}[0-9]{1,2} ?[0-9][A-Z]{2})$"
},
"VATNumbers": {
"Andorra": "Not applicable as Andorra does not have a standard VAT number system like EU countries.",
Expand All @@ -46,7 +88,28 @@
"Finland": "^FI\\d{8}$",
"France": "^FR[A-HJ-NP-Z0-9]{2}[0-9]{9}$",
"Germany": "^DE[0-9]{9}$",
"Italy": "^IT[0-9]{11}$"
"Italy": "^IT[0-9]{11}$",
"Latvia": "^LV\\d{11}$",
"Liechtenstein": "^LI\\d{5}$",
"Lithuania": "^LT\\d{9,12}$",
"Luxembourg": "^LU\\d{8}$",
"Malta": "^MT\\d{8}$",
"Montenegro": "^ME\\d{8}$",
"Monaco": "^FR[A-HJ-NP-Z0-9]{2}\\d{9}$",
"Netherlands": "^NL\\d{9}B\\d{2}$",
"North Macedonia": "^MK\\d{13}$",
"Norway": "^NO\\d{9}MVA$",
"Poland": "^PL\\d{10}$",
"Portugal": "^PT\\d{9}$",
"Romania": "^RO\\d{2,10}$",
"San Marino": "^SM\\d{5}$",
"Serbia": "^RS\\d{9}$",
"Slovakia": "^SK\\d{10}$",
"Slovenia": "^SI\\d{8}$",
"Spain": "^ES[A-Z]\\d{7}[A-Z]$|^ES[A-Z][0-9]{7}[0-9A-Z]$|^ES[0-9]{8}[A-Z]$",
"Sweden": "^SE\\d{12}$",
"Switzerland": "^CHE\\d{9}MWST|TVA|IVA$",
"United Kingdom": "^GB\\d{9}$|^GB\\d{12}$|^GBGD\\d{3}$|^GBHA\\d{3}$"
},
"commonPatterns": {
"Dates": "^(0?[1-9]|[12][0-9]|3[01])[- /.](0?[1-9]|1[012])[- /.]\\d{4}$",
Expand Down

0 comments on commit ae01759

Please sign in to comment.