Skip to content

Commit c85b86c

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 248d7c0 commit c85b86c

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
@@ -118,6 +118,7 @@ const phones = {
118118
'tg-TJ': /^(\+?992)?[5][5]\d{7}$/,
119119
'th-TH': /^(\+66|66|0)\d{9}$/,
120120
'tr-TR': /^(\+?90|0)?5\d{9}$/,
121+
'tk-TM': /^(\+993|993|8)\d{8}$/,
121122
'uk-UA': /^(\+?38|8)?0\d{9}$/,
122123
'uz-UZ': /^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/,
123124
'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
@@ -8139,6 +8139,22 @@ describe('Validators', () => {
81398139
'081234567891',
81408140
],
81418141
},
8142+
{
8143+
locale: 'tk-TM',
8144+
valid: [
8145+
'+99312495154',
8146+
'99312130136',
8147+
'+99312918407',
8148+
'99312183399',
8149+
'812391717',
8150+
],
8151+
invalid: [
8152+
'12345',
8153+
'+99412495154',
8154+
'99412495154',
8155+
'998900066506',
8156+
],
8157+
},
81428158
{
81438159
locale: ['en-ZA', 'be-BY'],
81448160
valid: [

0 commit comments

Comments
 (0)