Skip to content

Commit 26605f9

Browse files
husan-eshonqulovprofnandaa
authored andcommitted
feat(isMobilePhone): add Turkmenistan tk-TM
squashed commits and resolved merge conflict for #1780 Add Turkmenistan validation regax Update README.md to include Turkmenistan (tk-Tm) Add test cases for tk-TM add missing comma for isMobilePhone.js add missing commas for test/validators.js
1 parent 0e5d5d4 commit 26605f9

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/lib/isMobilePhone.js

+1
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ const phones = {
122122
'tg-TJ': /^(\+?992)?[5][5]\d{7}$/,
123123
'th-TH': /^(\+66|66|0)\d{9}$/,
124124
'tr-TR': /^(\+?90|0)?5\d{9}$/,
125+
'tk-TM': /^(\+993|993|8)\d{8}$/,
125126
'uk-UA': /^(\+?38|8)?0\d{9}$/,
126127
'uz-UZ': /^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/,
127128
'vi-VN': /^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,

test/validators.js

+16
Original file line numberDiff line numberDiff line change
@@ -8201,6 +8201,22 @@ describe('Validators', () => {
82018201
'081234567891',
82028202
],
82038203
},
8204+
{
8205+
locale: 'tk-TM',
8206+
valid: [
8207+
'+99312495154',
8208+
'99312130136',
8209+
'+99312918407',
8210+
'99312183399',
8211+
'812391717',
8212+
],
8213+
invalid: [
8214+
'12345',
8215+
'+99412495154',
8216+
'99412495154',
8217+
'998900066506',
8218+
],
8219+
},
82048220
{
82058221
locale: ['en-ZA', 'be-BY'],
82068222
valid: [

0 commit comments

Comments
 (0)