Skip to content

Commit 196acb0

Browse files
Update the validation patterns (GH-23)
2 parents 1b7acf5 + bdb0743 commit 196acb0

File tree

2 files changed

+38
-26
lines changed

2 files changed

+38
-26
lines changed

resources/metadata.xml

Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5394,7 +5394,7 @@
53945394
[06]7|
53955395
19|
53965396
25|
5397-
73
5397+
7[39]
53985398
)|
53995399
90[25]
54005400
)[2-9]\d{6}
@@ -5452,7 +5452,7 @@
54525452
[06]7|
54535453
19|
54545454
25|
5455-
73
5455+
7[39]
54565456
)|
54575457
90[25]
54585458
)[2-9]\d{6}
@@ -11120,16 +11120,19 @@
1112011120
)\d\d|
1112111121
(?:
1112211122
5(?:
11123-
00(?:
11124-
0\d|
11125-
11|
11126-
22|
11127-
33|
11128-
44|
11129-
5[05]|
11130-
77|
11131-
88|
11132-
9[09]
11123+
0(?:
11124+
0(?:
11125+
0\d|
11126+
11|
11127+
22|
11128+
33|
11129+
44|
11130+
5[05]|
11131+
77|
11132+
88|
11133+
9[09]
11134+
)|
11135+
111
1113311136
)|
1113411137
1(?:
1113511138
1(?:
@@ -13592,7 +13595,7 @@
1359213595
7(?:
1359313596
38(?:
1359413597
0\d|
13595-
5[09]|
13598+
5[019]|
1359613599
88
1359713600
)|
1359813601
8(?:
@@ -18777,11 +18780,11 @@
1877718780
</territory>
1877818781

1877918782
<!-- Lithuania (LT) -->
18780-
<!-- Note that Lithuania is switching to a national prefix of 0. We support
18781-
both 0 and 8 when parsing until this switch is complete. -->
18783+
<!-- Note that Lithuania switched to national prefix 0. The former prefix
18784+
8 will continue to be operational until 28 February 2025. -->
1878218785
<!-- http://www.itu.int/oth/T020200007C/en -->
1878318786
<!-- National Prefix formatting rule from http://www.yellowpages.lt -->
18784-
<territory id="LT" countryCode="370" internationalPrefix="00" nationalPrefix="8"
18787+
<territory id="LT" countryCode="370" internationalPrefix="00" nationalPrefix="0"
1878518788
nationalPrefixForParsing="[08]" mobileNumberPortableRegion="true">
1878618789
<availableFormats>
1878718790
<!-- 1 digit area code (fixed line only) -->
@@ -27781,12 +27784,17 @@
2778127784
<format>$1 $2-$3-$4</format>
2778227785
</numberFormat>
2778327786
<numberFormat pattern="(\d{2})(\d{6})" nationalPrefixFormattingRule="$NP $FG">
27784-
<leadingDigits>6</leadingDigits>
27787+
<leadingDigits>[67]</leadingDigits>
2778527788
<format>$1 $2</format>
2778627789
</numberFormat>
2778727790
</availableFormats>
2778827791
<generalDesc>
27789-
<nationalNumberPattern>[1-6]\d{7}</nationalNumberPattern>
27792+
<nationalNumberPattern>
27793+
(?:
27794+
[1-6]\d|
27795+
71
27796+
)\d{6}
27797+
</nationalNumberPattern>
2779027798
</generalDesc>
2779127799
<!-- Additional prefixes from the wikipedia page. -->
2779227800
<fixedLine>
@@ -27829,7 +27837,12 @@
2782927837
<mobile>
2783027838
<possibleLengths national="8"/>
2783127839
<exampleNumber>66123456</exampleNumber>
27832-
<nationalNumberPattern>6\d{7}</nationalNumberPattern>
27840+
<nationalNumberPattern>
27841+
(?:
27842+
6\d|
27843+
71
27844+
)\d{6}
27845+
</nationalNumberPattern>
2783327846
</mobile>
2783427847
</territory>
2783527848

@@ -28644,10 +28657,9 @@
2864428657
<possibleLengths national="9"/>
2864528658
<exampleNumber>621234567</exampleNumber>
2864628659
<nationalNumberPattern>
28647-
77[2-9]\d{6}|
2864828660
(?:
2864928661
6[125-9]|
28650-
7[13-689]
28662+
7[13-9]
2865128663
)\d{7}
2865228664
</nationalNumberPattern>
2865328665
</mobile>
@@ -28810,7 +28822,7 @@
2881028822
39|
2881128823
50|
2881228824
6[36-8]|
28813-
7[1-3]|
28825+
7[1-357]|
2881428826
9[1-9]
2881528827
)\d{7}
2881628828
</nationalNumberPattern>
@@ -28919,7 +28931,7 @@
2891928931
[015-8]\d|
2892028932
20|
2892128933
36|
28922-
4[0-4]|
28934+
4[0-5]|
2892328935
9[89]
2892428936
)\d{6}
2892528937
</nationalNumberPattern>
@@ -29002,7 +29014,7 @@
2900229014
0[1-35-9]|
2900329015
1[02-9]|
2900429016
2[03-57-9]|
29005-
3[149]|
29017+
3[1459]|
2900629018
4[08]|
2900729019
5[1-46]|
2900829020
6[0279]|
@@ -29108,7 +29120,7 @@
2910829120
0[1-35-9]|
2910929121
1[02-9]|
2911029122
2[03-57-9]|
29111-
3[149]|
29123+
3[1459]|
2911229124
4[08]|
2911329125
5[1-46]|
2911429126
6[0279]|

src/metadata/validations.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@
825825
],
826826
"tm": [
827827
"^\\d{8}$",
828-
"^[1-6]\\d{7}$"
828+
"^(?:[1-6]\\d|71)\\d{6}$"
829829
],
830830
"tn": [
831831
"^\\d{8}$",

0 commit comments

Comments
 (0)