Skip to content

Commit 7cda875

Browse files
authoredFeb 8, 2023
feat(isMobilePhone): add fr-CF locale (#2176)
Co-authored-by: cheboi <moscheb96gmail.com>
1 parent ecce35f commit 7cda875

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
 

‎src/lib/isMobilePhone.js

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ const phones = {
4848
'en-IN': /^(\+?91|0)?[6789]\d{9}$/,
4949
'en-JM': /^(\+?876)?\d{7}$/,
5050
'en-KE': /^(\+?254|0)(7|1)\d{8}$/,
51+
'fr-CF': /^(\+?236| ?)(70|75|77|72|21|22)\d{6}$/,
5152
'en-SS': /^(\+?211|0)(9[1257])\d{7}$/,
5253
'en-KI': /^((\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/,
5354
'en-KN': /^(?:\+1|1)869(?:46\d|48[89]|55[6-8]|66\d|76[02-7])\d{4}$/,

‎test/validators.test.js

+25
Original file line numberDiff line numberDiff line change
@@ -7404,6 +7404,31 @@ describe('Validators', () => {
74047404
'+254800723845',
74057405
],
74067406
},
7407+
{
7408+
locale: 'fr-CF',
7409+
valid: [
7410+
'+23670850000',
7411+
'+23675038756',
7412+
'+23677859002',
7413+
'+23672854202',
7414+
'+23621854052',
7415+
'+23622854072',
7416+
'72234650',
7417+
'70045902',
7418+
'77934567',
7419+
'21456794',
7420+
'22452389',
7421+
],
7422+
invalid: [
7423+
'+23689032',
7424+
'123456789',
7425+
'+236723845987',
7426+
'022452389',
7427+
'+236772345678',
7428+
'+236700456794',
7429+
7430+
],
7431+
},
74077432
{
74087433
locale: 'en-KI',
74097434
valid: [

0 commit comments

Comments
 (0)
Please sign in to comment.