Skip to content

Commit cca678a

Browse files
Yazan-KEWikiRik
andauthored
fix(isMobilePhone): added extra prefix for ar-KW locale (#2138)
* feat(isMobilePhone): added Virgin Mobile provider mobile number validation (ar-KW) Added Virgin Mobile provider range (41XXXXXX) to ar-KW. **References**: - [Virgin Mobile Kuwait Official Website FAQ](https://www.virginmobile.com.kw/en/faq/the-available-numbers-all-start-with-410-411-will-a-new-range-of-numbers-be-available-soon/) * Update src/lib/isMobilePhone.js Co-authored-by: Rik Smale <13023439+WikiRik@users.noreply.github.com>
1 parent ee81073 commit cca678a

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/lib/isMobilePhone.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const phones = {
1010
'ar-EG': /^((\+?20)|0)?1[0125]\d{8}$/,
1111
'ar-IQ': /^(\+?964|0)?7[0-9]\d{8}$/,
1212
'ar-JO': /^(\+?962|0)?7[789]\d{7}$/,
13-
'ar-KW': /^(\+?965)[569]\d{7}$/,
13+
'ar-KW': /^(\+?965)([569]\d{7}|41\d{6})$/,
1414
'ar-LY': /^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$/,
1515
'ar-MA': /^(?:(?:\+|00)212|0)[5-7]\d{8}$/,
1616
'ar-OM': /^((\+|00)968)?(9[1-9])\d{6}$/,

test/validators.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6605,9 +6605,11 @@ describe('Validators', () => {
66056605
'96550000000',
66066606
'96560000000',
66076607
'96590000000',
6608+
'96541000000',
66086609
'+96550000000',
66096610
'+96550000220',
66106611
'+96551111220',
6612+
'+96541000000',
66116613
],
66126614
invalid: [
66136615
'+96570000220',
@@ -6618,6 +6620,7 @@ describe('Validators', () => {
66186620
'+9639626626262',
66196621
'+963332210972',
66206622
'0114152198',
6623+
'+96540000000',
66216624
],
66226625
},
66236626
{

0 commit comments

Comments
 (0)