Skip to content

Commit 627ca87

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 0ee110b commit 627ca87

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/lib/isMobilePhone.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ const phones = {
117117
'tg-TJ': /^(\+?992)?[5][5]\d{7}$/,
118118
'th-TH': /^(\+66|66|0)\d{9}$/,
119119
'tr-TR': /^(\+?90|0)?5\d{9}$/,
120+
'tk-TM': /^(\+993|993|8)\d{8}$/,
120121
'uk-UA': /^(\+?38|8)?0\d{9}$/,
121122
'uz-UZ': /^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/,
122123
'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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8117,6 +8117,22 @@ describe('Validators', () => {
81178117
'081234567891',
81188118
],
81198119
},
8120+
{
8121+
locale: 'tk-TM',
8122+
valid: [
8123+
'+99312495154',
8124+
'99312130136',
8125+
'+99312918407',
8126+
'99312183399',
8127+
'812391717',
8128+
],
8129+
invalid: [
8130+
'12345',
8131+
'+99412495154',
8132+
'99412495154',
8133+
'998900066506',
8134+
],
8135+
},
81208136
{
81218137
locale: ['en-ZA', 'be-BY'],
81228138
valid: [

0 commit comments

Comments
 (0)