Skip to content

Commit df3521d

Browse files
Update the validation patterns (GH-102)
2 parents 0ca76b6 + 24a3379 commit df3521d

File tree

2 files changed

+92
-74
lines changed

2 files changed

+92
-74
lines changed

resources/metadata.xml

Lines changed: 91 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -5830,7 +5830,7 @@
58305830
<mobile>
58315831
<possibleLengths national="8"/>
58325832
<exampleNumber>70012345</exampleNumber>
5833-
<nationalNumberPattern>7[024-7]\d{6}</nationalNumberPattern>
5833+
<nationalNumberPattern>7[02-7]\d{6}</nationalNumberPattern>
58345834
</mobile>
58355835
<premiumRate>
58365836
<possibleLengths national="8"/>
@@ -10140,7 +10140,7 @@
1014010140
)\d|
1014110141
7(?:
1014210142
[0-79]\d|
10143-
8[13-9]
10143+
8[013-9]
1014410144
)|
1014510145
8(?:
1014610146
[2-6]\d|
@@ -10299,10 +10299,9 @@
1029910299
8[0-247-9]
1030010300
)|
1030110301
7(?:
10302-
[0167]\d|
10302+
[016-8]\d|
1030310303
2[0-8]|
10304-
5[0-5]|
10305-
8[0-7]
10304+
5[0-5]
1030610305
)
1030710306
)\d{6}
1030810307
</nationalNumberPattern>
@@ -12003,7 +12002,10 @@
1200312002
)\d\d|
1200412003
5(?:
1200512004
0(?:
12006-
0[17]0|
12005+
0(?:
12006+
1[09]|
12007+
70
12008+
)|
1200712009
505
1200812010
)|
1200912011
1(?:
@@ -15169,7 +15171,10 @@
1516915171
95
1517015172
)|
1517115173
355|
15172-
83
15174+
8(?:
15175+
28[235-7]|
15176+
3
15177+
)
1517315178
)|
1517415179
73179|
1517515180
807(?:
@@ -15179,15 +15184,20 @@
1517915184
(?:
1518015185
1552|
1518115186
6(?:
15182-
1[1358]|
15183-
2[2457]|
15184-
3[2-4]|
15185-
4[235-7]|
15186-
5[2-689]|
15187-
6[24578]|
15188-
7[235689]|
15189-
8[124-6]
15190-
)\d|
15187+
(?:
15188+
1[1358]|
15189+
2[2457]|
15190+
3[2-4]|
15191+
4[235-7]|
15192+
5[2-689]|
15193+
6[24578]|
15194+
7[235689]
15195+
)\d|
15196+
8(?:
15197+
[14-6]\d|
15198+
2[0-79]
15199+
)
15200+
)|
1519115201
7(?:
1519215202
1(?:
1519315203
[013-8]\d|
@@ -15295,37 +15305,39 @@
1529515305
<possibleLengths national="10" localOnly="[6-8]"/>
1529615306
<exampleNumber>7410410123</exampleNumber>
1529715307
<nationalNumberPattern>
15298-
2717(?:
15299-
[2-7]\d|
15300-
95
15301-
)\d{4}|
1530215308
(?:
15303-
271[0-689]|
15304-
782[0-6]
15305-
)[2-7]\d{5}|
15309+
2717(?:
15310+
[2-7]\d|
15311+
95
15312+
)|
15313+
6828[235-7]\d
15314+
)\d{4}|
1530615315
(?:
1530715316
170[24]|
15308-
2(?:
15309-
(?:
15310-
[02][2-79]|
15311-
90
15312-
)\d|
15313-
80[13468]
15314-
)|
15315-
(?:
15316-
3(?:
15317-
23|
15318-
80
15319-
)|
15320-
683|
15321-
79[1-7]
15322-
)\d|
15317+
280[13468]|
1532315318
4(?:
1532415319
20[24]|
1532515320
72[2-8]
1532615321
)|
1532715322
552[1-7]
1532815323
)\d{6}|
15324+
(?:
15325+
271[0-689]|
15326+
682[0-79]|
15327+
782[0-6]
15328+
)[2-7]\d{5}|
15329+
(?:
15330+
2(?:
15331+
[02][2-79]|
15332+
90
15333+
)|
15334+
3(?:
15335+
23|
15336+
80
15337+
)|
15338+
683|
15339+
79[1-7]
15340+
)\d{7}|
1532915341
(?:
1533015342
11|
1533115343
33|
@@ -15469,7 +15481,7 @@
1546915481
5[2-689]|
1547015482
6[24578]|
1547115483
7[235689]|
15472-
8[124-6]
15484+
8[14-6]
1547315485
)|
1547415486
7(?:
1547515487
1[013-9]|
@@ -15513,7 +15525,10 @@
1551315525
<exampleNumber>8123456789</exampleNumber>
1551415526
<nationalNumberPattern>
1551515527
(?:
15516-
61279|
15528+
6(?:
15529+
1279|
15530+
828[01489]
15531+
)|
1551715532
7(?:
1551815533
887[02-9]|
1551915534
9(?:
@@ -15644,12 +15659,15 @@
1564415659
3[2-4]|
1564515660
4[235-7]|
1564615661
5[2-689]|
15647-
6[24578]|
15648-
8[124-6]
15662+
6[24578]
1564915663
)\d|
1565015664
7(?:
1565115665
[235689]\d|
1565215666
4[0189]
15667+
)|
15668+
8(?:
15669+
[14-6]\d|
15670+
2[0-79]
1565315671
)
1565415672
)|
1565515673
7(?:
@@ -19229,7 +19247,7 @@
1922919247
[01]\d|
1923019248
6[013-9]|
1923119249
8[7-9]|
19232-
9[0-3]
19250+
9[0-4]
1923319251
)
1923419252
)\d{5}
1923519253
</nationalNumberPattern>
@@ -20146,9 +20164,9 @@
2014620164
<numberFormat pattern="(\d{4})(\d{5})" nationalPrefixFormattingRule="$NP$FG">
2014720165
<leadingDigits>
2014820166
5(?:
20167+
[19]|
2014920168
2[2-46-9]|
20150-
3[3-9]|
20151-
9
20169+
3[3-9]
2015220170
)|
2015320171
8(?:
2015420172
0[89]|
@@ -20175,6 +20193,11 @@
2017520193
<exampleNumber>520123456</exampleNumber>
2017620194
<nationalNumberPattern>
2017720195
5(?:
20196+
(?:
20197+
18|
20198+
4[0679]|
20199+
5[03]
20200+
)\d|
2017820201
2(?:
2017920202
[0-25-79]\d|
2018020203
3[1-578]|
@@ -20187,11 +20210,7 @@
2018720210
6[02-8]|
2018820211
8[014-9]|
2018920212
9[3-9]
20190-
)|
20191-
(?:
20192-
4[067]|
20193-
5[03]
20194-
)\d
20213+
)
2019520214
)\d{5}
2019620215
</nationalNumberPattern>
2019720216
</fixedLine>
@@ -20206,10 +20225,9 @@
2020620225
8[0-247-9]
2020720226
)|
2020820227
7(?:
20209-
[0167]\d|
20228+
[016-8]\d|
2021020229
2[0-8]|
20211-
5[0-5]|
20212-
8[0-7]
20230+
5[0-5]
2021320231
)
2021420232
)\d{6}
2021520233
</nationalNumberPattern>
@@ -23912,17 +23930,14 @@
2391223930
<possibleLengths national="8"/>
2391323931
<exampleNumber>92123456</exampleNumber>
2391423932
<nationalNumberPattern>
23915-
1505\d{4}|
2391623933
(?:
23917-
7(?:
23918-
[125-9]\d|
23919-
41
23920-
)|
23921-
9(?:
23922-
0[1-9]|
23923-
[1-9]\d
23924-
)
23925-
)\d{5}
23934+
1505|
23935+
90[1-9]\d
23936+
)\d{4}|
23937+
(?:
23938+
7[124-9]|
23939+
9[1-9]
23940+
)\d{6}
2392623941
</nationalNumberPattern>
2392723942
</mobile>
2392823943
<!-- Link to document about toll-free numbers on http://www.tra.gov.om, which suggests they
@@ -26961,7 +26976,10 @@
2696126976
<possibleLengths national="8"/>
2696226977
<exampleNumber>81234567</exampleNumber>
2696326978
<nationalNumberPattern>
26964-
898[02-9]\d{4}|
26979+
89(?:
26980+
8[02-9]|
26981+
90
26982+
)\d{4}|
2696526983
(?:
2696626984
8(?:
2696726985
0[1-9]|
@@ -27543,9 +27561,9 @@
2754327561
<exampleNumber>701234567</exampleNumber>
2754427562
<nationalNumberPattern>
2754527563
7(?:
27546-
[05-8]\d|
27547-
[19]0|
27548-
21
27564+
[015-8]\d|
27565+
21|
27566+
90
2754927567
)\d{6}
2755027568
</nationalNumberPattern>
2755127569
</mobile>
@@ -27863,10 +27881,7 @@
2786327881
</availableFormats>
2786427882
<generalDesc>
2786527883
<nationalNumberPattern>
27866-
(?:
27867-
[267]\d\d|
27868-
500
27869-
)\d{5}|
27884+
[25-7]\d{7}|
2787027885
(?:
2787127886
80\d|
2787227887
900
@@ -27901,7 +27916,10 @@
2790127916
<exampleNumber>70123456</exampleNumber>
2790227917
<nationalNumberPattern>
2790327918
(?:
27904-
500[0-4]|
27919+
5(?:
27920+
00[0-4]|
27921+
100
27922+
)|
2790527923
[67]\d{3}
2790627924
)\d{4}
2790727925
</nationalNumberPattern>
@@ -29814,7 +29832,7 @@
2981429832
[014-8]\d|
2981529833
2[0167]|
2981629834
36|
29817-
9[0-289]
29835+
9[0-2589]
2981829836
)\d{6}
2981929837
</nationalNumberPattern>
2982029838
</mobile>

src/metadata/validations.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@
781781
],
782782
"sv": [
783783
"^\\d{7,11}$",
784-
"^(?:[267]\\d\\d|500)\\d{5}|(?:80\\d|900)\\d{4}(?:\\d{4})?$"
784+
"^[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?$"
785785
],
786786
"sx": [
787787
"^\\d{10}$",

0 commit comments

Comments
 (0)