Skip to content

Commit

Permalink
chore: add metadata and update NG test for libphonenumber v8.13.44 (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
dwbruhn authored Aug 26, 2024
1 parent dfc2a6e commit 6a1731a
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 45 deletions.
84 changes: 45 additions & 39 deletions server/metadata/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -4905,7 +4905,7 @@
[
null,
null,
"(?:0[1-35-7]|5[0-8]|[67]\\d)\\d{6}",
"(?:0[1-7]|5[0-8]|[67]\\d)\\d{6}",
null,
null,
null,
Expand Down Expand Up @@ -8894,7 +8894,7 @@
[
null,
null,
"[189]\\d{8}|[1-68]\\d{6}",
"(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",
null,
null,
null,
Expand All @@ -8903,13 +8903,15 @@
null,
[
7,
9
8,
9,
10
]
],
[
null,
null,
"12\\d{7}|[1-6]\\d{6}",
"(?:(?:12|573)\\d\\d|276)\\d{5}|[1-6]\\d{6}",
null,
null,
null,
Expand All @@ -8922,7 +8924,13 @@
null,
null,
null,
"991234567"
"991234567",
null,
null,
[
7,
9
]
],
[
null,
Expand Down Expand Up @@ -9023,6 +9031,15 @@
],
"0$1"
],
[
null,
"(\\d{2})(\\d{2})(\\d{4})",
"$1 $2 $3",
[
"2"
],
"0$1"
],
[
null,
"(\\d{2})(\\d{3})(\\d{4})",
Expand All @@ -9040,6 +9057,15 @@
"[89]"
],
"0$1"
],
[
null,
"(\\d{2})(\\d{2})(\\d{3})(\\d{3})",
"$1 $2 $3 $4",
[
"5"
],
"0$1"
]
],
null,
Expand Down Expand Up @@ -19221,7 +19247,7 @@
[
null,
null,
"(?:[23679]\\d|5[0-489])\\d{5}",
"(?:[23679]\\d|4[015]|5[0-489])\\d{5}",
null,
null,
null,
Expand Down Expand Up @@ -36807,15 +36833,14 @@
[
null,
null,
"2[0-24-9]\\d{8}|[78]\\d{10,13}|[7-9]\\d{9}|[1-9]\\d{7}|[124-7]\\d{6}",
"38\\d{6}|[78]\\d{9,13}|(?:20|9\\d)\\d{8}",
null,
null,
null,
null,
null,
null,
[
7,
8,
10,
11,
Expand All @@ -36824,28 +36849,27 @@
14
],
[
5,
6
6,
7
]
],
[
null,
null,
"20(?:[1259]\\d|3[013-9]|4[1-8]|6[024-689]|7[1-79]|8[2-9])\\d{6}|(?:(?:[1-356]\\d|4[02-8]|8[2-9])\\d|9(?:0[3-9]|[1-9]\\d))\\d{5}|7(?:0(?:[013-689]\\d|2[0-24-9])\\d{3,4}|[1-79]\\d{6})|(?:[12]\\d|4[147]|5[14579]|6[1578]|7[1-3578])\\d{5}",
"(?:20(?:[1259]\\d|3[013-9]|4[1-8]|6[024-689]|7[1-79]|8[2-9])|38)\\d{6}",
null,
null,
null,
"18040123",
"2033123456",
null,
null,
[
7,
8,
10
],
[
5,
6
6,
7
]
],
[
Expand Down Expand Up @@ -36947,30 +36971,12 @@
null,
null,
[
[
null,
"(\\d{2})(\\d{2})(\\d{3})",
"$1 $2 $3",
[
"78"
],
"0$1"
],
[
null,
"(\\d)(\\d{3})(\\d{3,4})",
"$1 $2 $3",
[
"[12]|9(?:0[3-9]|[1-9])"
],
"0$1"
],
[
null,
"(\\d{2})(\\d{3})(\\d{2,3})",
"$1 $2 $3",
[
"[3-6]|7(?:0[0-689]|[1-79])|8[2-9]"
"3"
],
"0$1"
],
Expand Down Expand Up @@ -42497,7 +42503,7 @@
[
null,
null,
"(?:630|702)0\\d{5}|(?:6(?:[04]0|2\\d)|7(?:0[013-9]|1[0-3]|[2-7]\\d|8[03-8]|9[0-39]))\\d{6}",
"(?:630|702)0\\d{5}|(?:6(?:00|2\\d)|7(?:0[013-9]|1[0-3]|[2-7]\\d|8[03-8]|9[0-39]))\\d{6}",
null,
null,
null,
Expand Down Expand Up @@ -44770,7 +44776,7 @@
[
null,
null,
"8(?:09[0-68]|95[0-2])\\d{4}|(?:8(?:0[1-8]|[1-8]\\d|9[0-4])|9[0-8]\\d)\\d{5}",
"8(?:09[0-689]|95[0-2])\\d{4}|(?:8(?:0[1-8]|[1-8]\\d|9[0-4])|9[0-8]\\d)\\d{5}",
null,
null,
null,
Expand Down Expand Up @@ -46426,7 +46432,7 @@
[
null,
null,
"7(?:(?:[06-8]\\d|21|90)\\d|5(?:01|[19]0|25|[38]3|[4-7]\\d))\\d{5}",
"7(?:(?:[06-8]\\d|21|90)\\d|5(?:0[01]|[19]0|2[25]|[38]3|[4-7]\\d))\\d{5}",
null,
null,
null,
Expand Down Expand Up @@ -49371,7 +49377,7 @@
[
null,
null,
"(?:33[03-9]|4(?:1[18]|4[02-479])|81[1-9])\\d{6}|(?:0[0-57-9]|1[017]|2[02]|[34]0|5[05]|7[01578]|8[078]|9\\d)\\d{7}",
"(?:33[03-9]|4(?:1[18]|4[02-479])|81[1-9])\\d{6}|(?:[09]\\d|1[017]|2[02]|[34]0|5[05]|7[01578]|8[078])\\d{7}",
null,
null,
null,
Expand Down Expand Up @@ -52504,7 +52510,7 @@
[
null,
null,
"(?:1(?:770|9(?:20|87))|(?:2\\d|4[2-7])\\d\\d)\\d{4}",
"(?:1(?:770|9(?:20|[89]7))|(?:2\\d|4[2-7])\\d\\d)\\d{4}",
null,
null,
null,
Expand Down
25 changes: 19 additions & 6 deletions test/input/phoneDataPositive.json
Original file line number Diff line number Diff line change
Expand Up @@ -2505,14 +2505,27 @@
{
"phoneObj": {
"countryCode": "234",
"nationalNumber": "12345678"
"nationalNumber": "8021234567"
},
"validationResult": true,
"formatted": {
"national": "01 234 5678",
"international": "+234 1 234 5678",
"e164": "+23412345678",
"rfc3966": "tel:+234-1-234-5678"
"national": "0802 123 4567",
"international": "+234 802 123 4567",
"e164": "+2348021234567",
"rfc3966": "tel:+234-802-123-4567"
}
},
{
"phoneObj": {
"countryCode": "234",
"nationalNumber": "2033123456"
},
"validationResult": true,
"formatted": {
"national": "02033 12 3456",
"international": "+234 2033 12 3456",
"e164": "+2342033123456",
"rfc3966": "tel:+234-2033-12-3456"
}
}
],
Expand Down Expand Up @@ -3842,4 +3855,4 @@
}
}
]
}
}

0 comments on commit 6a1731a

Please sign in to comment.