Skip to content

Commit b381aa9

Browse files
Update the validation patterns
1 parent 66ee746 commit b381aa9

File tree

2 files changed

+40
-37
lines changed

2 files changed

+40
-37
lines changed

resources/metadata.xml

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3753,12 +3753,17 @@
37533753
<!-- The national numbering plan from ITU suggests grouping of 2, 2 and 4, but we have
37543754
chosen to use the standard from numbers found on the internet instead. -->
37553755
<numberFormat pattern="(\d{2})(\d{2})(\d{2})(\d{2})">
3756-
<leadingDigits>[025-7]</leadingDigits>
3756+
<leadingDigits>[024-7]</leadingDigits>
37573757
<format>$1 $2 $3 $4</format>
37583758
</numberFormat>
37593759
</availableFormats>
37603760
<generalDesc>
3761-
<nationalNumberPattern>[025-7]\d{7}</nationalNumberPattern>
3761+
<nationalNumberPattern>
3762+
(?:
3763+
[025-7]\d|
3764+
44
3765+
)\d{6}
3766+
</nationalNumberPattern>
37623767
</generalDesc>
37633768
<fixedLine>
37643769
<possibleLengths national="8"/>
@@ -3791,6 +3796,7 @@
37913796
<nationalNumberPattern>
37923797
(?:
37933798
0[1-7]|
3799+
44|
37943800
5[0-8]|
37953801
[67]\d
37963802
)\d{6}
@@ -9300,17 +9306,15 @@
93009306
<possibleLengths national="10,11"/>
93019307
<exampleNumber>15123456789</exampleNumber>
93029308
<nationalNumberPattern>
9309+
15310\d{6}|
93039310
1(?:
9304-
(?:
9305-
5(?:
9306-
[0-25-9]\d\d|
9307-
310
9308-
)|
9309-
7[26]\d\d
9310-
)\d{6}|
9311-
6[023]\d{7,8}
9312-
)|
9313-
17\d{8}
9311+
5[0-25-9]\d|
9312+
7[013-5]
9313+
)\d{7}|
9314+
1(?:
9315+
6[023]|
9316+
7[26-9]
9317+
)\d{7,8}
93149318
</nationalNumberPattern>
93159319
</mobile>
93169320
<pager>
@@ -10267,7 +10271,7 @@
1026710271
)|
1026810272
7(?:
1026910273
[0167]\d|
10270-
2[0-467]|
10274+
2[0-8]|
1027110275
5[0-3]|
1027210276
8[0-7]
1027310277
)
@@ -13253,7 +13257,8 @@
1325313257
6\d\d|
1325413258
7(?:
1325513259
[0-5]\d|
13256-
6[01]
13260+
6[019]|
13261+
70
1325713262
)
1325813263
)\d{4}
1325913264
</nationalNumberPattern>
@@ -13364,16 +13369,17 @@
1336413369
4(?:
1336513370
44[0-35-9]|
1336613371
6(?:
13367-
1[0-79]|
1336813372
4[0-57-9]|
1336913373
6[0-4]
1337013374
)|
1337113375
7(?:
13372-
[26][0-5]|
13373-
4[0-48]
13376+
30|
13377+
4[0-48]|
13378+
6[0-5]
1337413379
)
1337513380
)|
1337613381
5(?:
13382+
35[4-8]|
1337713383
73[0-6]|
1337813384
95[0-8]
1337913385
)|
@@ -13402,8 +13408,8 @@
1340213408
(?:
1340313409
4(?:
1340413410
4[0-35-9]|
13405-
6[02357-9]|
13406-
7[015]
13411+
6[0-357-9]|
13412+
7[0-25]
1340713413
)|
1340813414
5(?:
1340913415
[1-59][0-46-9]|
@@ -13753,12 +13759,7 @@
1375313759
</numberFormat>
1375413760
</availableFormats>
1375513761
<generalDesc>
13756-
<nationalNumberPattern>
13757-
(?:
13758-
[2-489]\d|
13759-
55
13760-
)\d{6}
13761-
</nationalNumberPattern>
13762+
<nationalNumberPattern>[2-589]\d{7}</nationalNumberPattern>
1376213763
</generalDesc>
1376313764
<!-- Digicel reported 281 and 29[149] belong to them, the more recent ITU doc 20.I.2017
1376413765
agrees and classifies them as fixedLine so we follow that here. -->
@@ -13782,7 +13783,7 @@
1378213783
<nationalNumberPattern>
1378313784
(?:
1378413785
[34]\d|
13785-
55
13786+
5[56]
1378613787
)\d{6}
1378713788
</nationalNumberPattern>
1378813789
</mobile>
@@ -18871,7 +18872,7 @@
1887118872
<!-- Calling code and formatting shared with 'RU' -->
1887218873
<!-- http://www.itu.int/oth/T020200006F/en -->
1887318874
<!-- https://telecom.kz/en/catalog/kazahstan.171777/5 -->
18874-
<territory id="KZ" countryCode="7" leadingDigits="33|7" preferredInternationalPrefix="8~10"
18875+
<territory id="KZ" countryCode="7" leadingDigits="33622|7" preferredInternationalPrefix="8~10"
1887518876
internationalPrefix="810" nationalPrefix="8" mobileNumberPortableRegion="true">
1887618877
<generalDesc>
1887718878
<nationalNumberPattern>
@@ -20144,7 +20145,7 @@
2014420145
)|
2014520146
7(?:
2014620147
[0167]\d|
20147-
2[0-467]|
20148+
2[0-8]|
2014820149
5[0-3]|
2014920150
8[0-7]
2015020151
)
@@ -25986,9 +25987,8 @@
2598625987
<!-- Formatting from wikipedia, confirmed on government websites such as
2598725988
http://www.minjust.ru/ru/structure/contact/. Contains formatting instructions for
2598825989
Kazakhstan as well. -->
25989-
<territory id="RU" mainCountryForCode="true" countryCode="7" leadingDigits="3[04-689]|[489]"
25990-
preferredInternationalPrefix="8~10" internationalPrefix="810" nationalPrefix="8"
25991-
mobileNumberPortableRegion="true">
25990+
<territory id="RU" mainCountryForCode="true" countryCode="7" preferredInternationalPrefix="8~10"
25991+
internationalPrefix="810" nationalPrefix="8" mobileNumberPortableRegion="true">
2599225992
<availableFormats>
2599325993
<numberFormat pattern="(\d{3})(\d{2})(\d{2})">
2599425994
<leadingDigits>[0-79]</leadingDigits>
@@ -26143,6 +26143,10 @@
2614326143
<possibleLengths national="10" localOnly="7"/>
2614426144
<exampleNumber>3011234567</exampleNumber>
2614526145
<nationalNumberPattern>
26146+
336(?:
26147+
[013-9]\d|
26148+
2[013-9]
26149+
)\d{5}|
2614626150
(?:
2614726151
3(?:
2614826152
0[12]|
@@ -26165,8 +26169,8 @@
2616526169
2[01]|
2616626170
3[13-6]|
2616726171
4[0-8]|
26168-
5[15]|
26169-
6[1-35-79]|
26172+
5[15-7]|
26173+
6[0-35-79]|
2617026174
7[1-37-9]
2617126175
)
2617226176
)\d{7}
@@ -29729,10 +29733,9 @@
2972929733
<nationalNumberPattern>
2973029734
72[48]0\d{5}|
2973129735
7(?:
29732-
[015-8]\d|
29736+
[014-8]\d|
2973329737
2[067]|
2973429738
36|
29735-
4[0-8]|
2973629739
9[0189]
2973729740
)\d{6}
2973829741
</nationalNumberPattern>

src/metadata/validations.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
],
7474
"bf": [
7575
"^\\d{8}$",
76-
"^[025-7]\\d{7}$"
76+
"^(?:[025-7]\\d|44)\\d{6}$"
7777
],
7878
"bg": [
7979
"^\\d{6,9}$",
@@ -353,7 +353,7 @@
353353
],
354354
"ht": [
355355
"^\\d{8}$",
356-
"^(?:[2-489]\\d|55)\\d{6}$"
356+
"^[2-589]\\d{7}$"
357357
],
358358
"hu": [
359359
"^\\d{8,9}$",

0 commit comments

Comments
 (0)