Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added updated postal codes for some countries #80

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions formats/AR.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"Description": "AR : NNNN, ANNNNAAA",
"RedundantCharacters": " -",
"ValidationRegex": "^[0-9]{4}|[A-Z][0-9]{4}[A-Z]{3}$",
"TestData": {
"Valid": [
"9679",
"A1234ABC"
],
"Invalid": [
"AX123",
"A1234"
]
}
}
15 changes: 15 additions & 0 deletions formats/AS.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"Description": "AS : NNNNN-NNNN (range 96799)",
"RedundantCharacters": " -",
"ValidationRegex": "^96799-[0-9]{4}$",
"TestData": {
"Valid": [
"96799-NNNN",
"96799-1111"
],
"Invalid": [
"AX123",
"A1234"
]
}
}
12 changes: 6 additions & 6 deletions formats/BH.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"Description": "BH : NNN, NNNN",
"Description": "BH : NNN, NNNN (101 to 1216)",
"RedundantCharacters": " -",
"ValidationRegex": "^[0-9]{3,4}$",
"ValidationRegex": "^(10[1-9]|[1-9]{2}[0-9]|1[0-1][0-9]{2}|120[0-9]|121[0-6])$",
"TestData": {
"Valid": [
"123",
"1234"
"131",
"1210"
],
"Invalid": [
"12",
"12345"
"12345A"
]
}
}
}
15 changes: 15 additions & 0 deletions formats/BM.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"Description": "BM : AA NN,AA AA",
"RedundantCharacters": " -",
"ValidationRegex": "^[A-Z]{2} (?:[A-Z]{2}|[0-9]{2})$",
"TestData": {
"Valid": [
"AB 12",
"AB CD"
],
"Invalid": [
"AX123",
"A1234"
]
}
}
14 changes: 7 additions & 7 deletions formats/BN.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"Description": "BN : LLNNNN",
"Description": "BN : [B,K,T,P]ANNNN",
"RedundantCharacters": " -",
"ValidationRegex": "^[a-zA-Z]{2}[0-9]{4}$",
"ValidationRegex": "^[BKTP][A-Z][0-9]{4}$",
"TestData": {
"Valid": [
"AB1234",
"tK0987"
"BA1234",
"KK0987"
],
"Invalid": [
"abc123",
"a12345",
"at123",
"BH12345"
"at123",
"BH12345"
]
}
}
}
17 changes: 17 additions & 0 deletions formats/CR.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"Description": "CR : [1-7]NNNN , [1-7]NNNN-NNNN",
"RedundantCharacters": " -",
"ValidationRegex": "^[1-7][0-9]{4}(?:-[0-9]{4})?$",
"TestData": {
"Valid": [
"12345",
"12345-1234"
],
"Invalid": [
"abc123",
"a12345",
"at123",
"BH12345"
]
}
}
15 changes: 15 additions & 0 deletions formats/CZ.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"Description": "CZ : [1-7]NNNN",
"RedundantCharacters": " -",
"ValidationRegex": "^[1-7][0-9]{4}$",
"TestData": {
"Valid": [
"11111",
"41111"
],
"Invalid": [
"AX123",
"A1234"
]
}
}
15 changes: 15 additions & 0 deletions formats/FO.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"Description": "FO : CCNNN(FONNN)",
"RedundantCharacters": " -",
"ValidationRegex": "^FO[0-9]{3}$",
"TestData": {
"Valid": [
"FO411",
"FO493"
],
"Invalid": [
"AX123",
"A1234"
]
}
}
38 changes: 19 additions & 19 deletions formats/GG.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"Description": "GG",
"RedundantCharacters": " -",
"ValidationRegex": "^GY[0-9]{2,3}[A-Za-z]{2}$",
"TestData": {
"Valid": [
"GY1 1AA",
"GY111AA"
],
"Invalid": [
"CW3 9SS",
"GG1 1AA",
"SE5 0EG",
"SE50EG",
"WC2H 7LTa",
"WC2H"
]
}
}
{
"Description": "GG : GYN NAA,GY10 NAA",
"RedundantCharacters": " -",
"ValidationRegex": "^GY([0-9]|10) [0-9][A-Z]{2}$",
"TestData": {
"Valid": [
"GY1 1AA",
"GY10 1AA"
],
"Invalid": [
"CW3 9SS",
"GG1 1AA",
"SE5 0EG",
"SE50EG",
"WC2H 7LTa",
"WC2H"
]
}
}
13 changes: 13 additions & 0 deletions formats/GH.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"Description": "GH : A[A,N]NNN[null,N][null,N],A[A,N]NNN[null,N][null,N]NNNN",
"RedundantCharacters": " -",
"ValidationRegex": "^[A-Z]([A-Z]|[0-9])[0-9]{3,5}(?:[0-9]{4})?$",
"TestData": {
"Valid": [
"AA111"
],
"Invalid": [
"AX"
]
}
}
15 changes: 15 additions & 0 deletions formats/GL.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"Description": "GL : NNNN , CC-NNNN(DK-NNNN)",
"RedundantCharacters": " -",
"ValidationRegex": "^([0-9]{4}|DK-[0-9]{4})$",
"TestData": {
"Valid": [
"9841",
"DK-8493"
],
"Invalid": [
"AX123",
"A1234"
]
}
}
14 changes: 14 additions & 0 deletions formats/GU.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"Description": "GU : 969[1-3][0-9]-NNNN",
"RedundantCharacters": " -",
"ValidationRegex": "^969[1-3][0-9]-[0-9]{4}$",
"TestData": {
"Valid": [
"9692-9999"
],
"Invalid": [
"AX123",
"A1234"
]
}
}
9 changes: 4 additions & 5 deletions formats/HN.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
{
"Description": "HN : CCNNNNN",
"Description": "HN : AANNNN , NNNNN",
"RedundantCharacters": " -",
"ValidationRegex": "^(HN)?[0-9]{5}$",
"ValidationRegex": "^([A-Z]{2}|[0-9])[0-9]{4}$",
"TestData": {
"Valid": [
"HN12345",
"AB1234",
"12345"
],
"Invalid": [
"123456",
"HN123456",
"HN1234"
"113233"
]
}
}
14 changes: 14 additions & 0 deletions formats/KH.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"Description": "KH : NNN NNN",
"RedundantCharacters": " -",
"ValidationRegex": "^[0-9]{3} [0-9]{3}$",
"TestData": {
"Valid": [
"111 111"
],
"Invalid": [
"AX123",
"A1234"
]
}
}
6 changes: 3 additions & 3 deletions formats/SZ.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"Description": "SZ : ANNN",
"Description": "SZ : [H,M,S,L]NNN",
"RedundantCharacters": " -",
"ValidationRegex": "^[a-zA-Z]{1}[0-9]{3}$",
"ValidationRegex": "^[HMSL][0-9]{3}$",
"TestData": {
"Valid": [
"S123",
"a789"
"M789"
],
"Invalid": [
"F1234",
Expand Down
15 changes: 15 additions & 0 deletions formats/TF.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"Description": "TF : 984NN",
"RedundantCharacters": " -",
"ValidationRegex": "^984[0-9]{2}$",
"TestData": {
"Valid": [
"98411",
"98493"
],
"Invalid": [
"AX123",
"A1234"
]
}
}
11 changes: 5 additions & 6 deletions formats/VG.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
{
"Description": "VG : CCNNNN",
"RedundantCharacters": " -",
"ValidationRegex": "^(VG)?[0-9]{4}$",
"ValidationRegex": "^VG11[1-6]0$",
"TestData": {
"Valid": [
"1234",
"VG1234",
"VG-1234"
"VG1110",
"VG1160"
],
"Invalid": [
"VG123",
"V1234",
"VG-12345"
"VG-12345"
]
}
}
}
Loading