Skip to content

Commit 6bf7a07

Browse files
committed
feat(isMobilePhone): add support for Guinea (fr-GN)
1 parent c3dc37c commit 6bf7a07

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

src/lib/isMobilePhone.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ const phones = {
102102
'fr-BJ': /^(\+229)\d{8}$/,
103103
'fr-CD': /^(\+?243|0)?(8|9)\d{8}$/,
104104
'fr-CM': /^(\+?237)6[0-9]{8}$/,
105+
'fr-GN': /^(\+?224)?6\d{8}$/,
105106
'fr-FR': /^(\+?33|0)[67]\d{8}$/,
106107
'fr-GF': /^(\+?594|0|00594)[67]\d{8}$/,
107108
'fr-GP': /^(\+?590|0|00590)[67]\d{8}$/,

test/validators.test.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9844,6 +9844,36 @@ describe('Validators', () => {
98449844
'+2379981247429',
98459845
],
98469846
},
9847+
{
9848+
locale: 'fr-GN',
9849+
valid: [
9850+
'+224612345678',
9851+
'+224623456789',
9852+
'+224698765432',
9853+
'+224655000000',
9854+
'224612345678',
9855+
'224699999999',
9856+
'612345678',
9857+
'600000000',
9858+
'699999999',
9859+
],
9860+
invalid: [
9861+
'NotANumber',
9862+
'+224512345678',
9863+
'+224712345678',
9864+
'+224812345678',
9865+
'+224912345678',
9866+
'+224012345678',
9867+
'+22461234567',
9868+
'+2246123456789',
9869+
'22461234567',
9870+
'61234567',
9871+
'6123456789',
9872+
'512345678',
9873+
'712345678',
9874+
'',
9875+
],
9876+
},
98479877
{
98489878
locale: 'ko-KR',
98499879
valid: [

0 commit comments

Comments
 (0)