Skip to content

Commit 8317f0d

Browse files
Update the validation patterns (GH-72)
2 parents c4ea145 + 994af6f commit 8317f0d

File tree

2 files changed

+18
-25
lines changed

2 files changed

+18
-25
lines changed

resources/metadata.xml

+17-24
Original file line numberDiff line numberDiff line change
@@ -11149,7 +11149,7 @@
1114911149
</nationalNumberPattern>
1115011150
</generalDesc>
1115111151
<!-- Gabon has undergone renumbering in November 2019 where the prefix 01 is changed to 011;
11152-
and intial "0" is no more needed when dialled internationally. Thus they become 7 digit
11152+
and initial "0" is no more needed when dialled internationally. Thus they become 7 digit
1115311153
to 8 digit excluding 0. -->
1115411154
<!-- About numbers in older version, which may soon get invalid:
1115511155
A 7-digit fixed-line plan was scheduled to be implemented on June 17, 2012 to unify fixed
@@ -11163,7 +11163,7 @@
1116311163
<nationalNumberPattern>[01]1\d{6}</nationalNumberPattern>
1116411164
</fixedLine>
1116511165
<!-- Gabon has undergone renumbering in November 2019 where the prefixes 0[256] are changed
11166-
to 6[256] respectively and similarly 0[47] changed to 7[47]. The intial "0" is no more
11166+
to 6[256] respectively and similarly 0[47] changed to 7[47]. The initial "0" is no more
1116711167
needed when dialled internationally. Thus they become 7 digit to 8 digit excluding 0. -->
1116811168
<!-- About old numbers, which may soon get invalid: Mobile numbers can be 7 or 8 digits
1116911169
(with or without a leading zero). -->
@@ -16909,8 +16909,8 @@
1690916909
<!-- https://www.itu.int/oth/T020200006D/en -->
1691016910
<!-- http://www.numberingplans.com/?page=dialling&sub=areacodes&ac=JP -->
1691116911
<!-- nationalPrefixTransformRule is used here for purpose of capturing 0005999999 kind of
16912-
short codes without dropping intial '0' as national prefix. As we are using this field, the
16913-
library is unable to capture domestic carrier codes used, example input:
16912+
short codes without dropping initial '0' as national prefix. As we are using this field,
16913+
the library is unable to capture domestic carrier codes used, example input:
1691416914
003768-0XX-YYYY-ZZZZ. Due to historic reasons, the parts that we captured in
1691516915
nationalPrefixTransform rule can either be used to transform or to capture in fields like
1691616916
preferred_domestic_carrier_code; schema is designed this way. -->
@@ -23551,19 +23551,22 @@
2355123551
<territory id="NR" countryCode="674" internationalPrefix="00">
2355223552
<availableFormats>
2355323553
<numberFormat pattern="(\d{3})(\d{4})">
23554-
<leadingDigits>[4-68]</leadingDigits>
23554+
<leadingDigits>[24-9]</leadingDigits>
2355523555
<format>$1 $2</format>
2355623556
</numberFormat>
2355723557
</availableFormats>
2355823558
<generalDesc>
2355923559
<nationalNumberPattern>
2356023560
(?:
23561+
222|
2356123562
444|
2356223563
(?:
2356323564
55|
2356423565
8\d
2356523566
)\d|
23566-
666
23567+
666|
23568+
777|
23569+
999
2356723570
)\d{4}
2356823571
</nationalNumberPattern>
2356923572
</generalDesc>
@@ -23577,9 +23580,12 @@
2357723580
<exampleNumber>5551234</exampleNumber>
2357823581
<nationalNumberPattern>
2357923582
(?:
23583+
222|
2358023584
55[3-9]|
2358123585
666|
23582-
8\d\d
23586+
777|
23587+
8\d\d|
23588+
999
2358323589
)\d{4}
2358423590
</nationalNumberPattern>
2358523591
</mobile>
@@ -29865,7 +29871,7 @@
2986529871
8(?:
2986629872
0[1-68]|
2986729873
1[02-8]|
29868-
2[068]|
29874+
2[0168]|
2986929875
3[0-2589]|
2987029876
4[03578]|
2987129877
5[046-9]|
@@ -29975,7 +29981,7 @@
2997529981
8(?:
2997629982
0[1-68]|
2997729983
1[02-8]|
29978-
2[068]|
29984+
2[0168]|
2997929985
3[0-2589]|
2998029986
4[03578]|
2998129987
5[046-9]|
@@ -30221,10 +30227,7 @@
3022130227
7[124-6]|
3022230228
9[135-8]
3022330229
)|
30224-
(?:
30225-
1[12]|
30226-
[68]\d
30227-
)\d|
30230+
[168]\d\d|
3022830231
2(?:
3022930232
22|
3023030233
3[13-57-9]|
@@ -30363,16 +30366,6 @@
3036330366
)|
3036430367
7(?:
3036530368
[07]\d{3}|
30366-
1(?:
30367-
13[01]|
30368-
6(?:
30369-
0[47]|
30370-
1[67]|
30371-
66
30372-
)|
30373-
71[3-69]|
30374-
98\d
30375-
)|
3037630369
2(?:
3037730370
2(?:
3037830371
2[79]|
@@ -31689,7 +31682,6 @@
3168931682
<possibleLengths national="9"/>
3169031683
<exampleNumber>101234567</exampleNumber>
3169131684
<nationalNumberPattern>
31692-
50[0-2]\d{6}|
3169331685
(?:
3169431686
2(?:
3169531687
0330|
@@ -31741,6 +31733,7 @@
3174131733
9[12]\d\d
3174231734
)|
3174331735
(?:
31736+
50[0-2]|
3174431737
6\d\d|
3174531738
7(?:
3174631739
[0-46-9]\d|

src/metadata/validations.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@
625625
],
626626
"nr": [
627627
"^\\d{7}$",
628-
"^(?:444|(?:55|8\\d)\\d|666)\\d{4}$"
628+
"^(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}$"
629629
],
630630
"nu": [
631631
"^\\d{4,7}$",

0 commit comments

Comments
 (0)