Skip to content

Commit 5b06703

Browse files
brendan-cprofnandaa
authored andcommittedOct 31, 2021
feat(isMobilePhone): add Palestine ar-PS locale
Add isMobilePhone test for ar-PS Add ar-PS to isMobilePhone readme Correct ar-PS validation Update ar-PS isMobible tests
1 parent a3faa83 commit 5b06703

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
 

‎src/lib/isMobilePhone.js

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const phones = {
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}$/,
17+
'ar-PS': /^(\+?970|0)5[6|9](\d{7})$/,
1718
'ar-SA': /^(!?(\+?966)|0)?5\d{8}$/,
1819
'ar-SY': /^(!?(\+?963)|0)?9\d{8}$/,
1920
'ar-TN': /^(\+?216)?[2459]\d{7}$/,

‎test/validators.js

+20
Original file line numberDiff line numberDiff line change
@@ -6027,6 +6027,26 @@ describe('Validators', () => {
60276027
'02122333',
60286028
],
60296029
},
6030+
{
6031+
locale: 'ar-PS',
6032+
valid: [
6033+
'+970563459876',
6034+
'970592334218',
6035+
'0566372345',
6036+
'0598273583',
6037+
],
6038+
invalid: [
6039+
'+9759029487',
6040+
'97059123456789',
6041+
'598372348',
6042+
'97058aaaafjd',
6043+
'',
6044+
'05609123484',
6045+
'+97059',
6046+
'+970',
6047+
'97056',
6048+
],
6049+
},
60306050
{
60316051
locale: 'ar-SY',
60326052
valid: [

0 commit comments

Comments
 (0)