diff --git a/src/lib/isMobilePhone.js b/src/lib/isMobilePhone.js index b00391ea6..945430297 100644 --- a/src/lib/isMobilePhone.js +++ b/src/lib/isMobilePhone.js @@ -101,6 +101,7 @@ const phones = { 'fr-BF': /^(\+226|0)[67]\d{7}$/, 'fr-BJ': /^(\+229)\d{8}$/, 'fr-CD': /^(\+?243|0)?(8|9)\d{8}$/, + 'fr-CI': /^(\+225|0)(0[1]|05|07)\d{7}$/, 'fr-CM': /^(\+?237)6[0-9]{8}$/, 'fr-FR': /^(\+?33|0)[67]\d{8}$/, 'fr-GF': /^(\+?594|0|00594)[67]\d{8}$/, diff --git a/test/validators.test.js b/test/validators.test.js index 12c5fc2ab..4248a8566 100644 --- a/test/validators.test.js +++ b/test/validators.test.js @@ -11033,6 +11033,22 @@ describe('Validators', () => { args: [], }); + // fr-CI (Ivory Coast - French) + test({ + validator: 'isMobilePhone', + args: ['fr-CI'], + valid: [ + '+2250512345678', + '+2250712345678', + '0512345678', + '0712345678', + ], + invalid: [ + '12345', + '+2259912345678', + 'abcdefghij', + ], + }); it('should error on invalid locale', () => { test({