Skip to content

Commit

Permalink
Merge pull request #1946 from rapaantti/is-mobile-phone-finnish-numbers
Browse files Browse the repository at this point in the history
fix(isMobilePhone): Change fi-FI mobile phone number regexp to support 050xxxx numbers
  • Loading branch information
rubiin authored Jul 18, 2022
2 parents ccf4170 + 1bb491c commit 8233ff1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/isMobilePhone.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const phones = {
'es-VE': /^(\+?58)?(2|4)\d{9}$/,
'et-EE': /^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/,
'fa-IR': /^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/,
'fi-FI': /^(\+?358|0)\s?(4(0|1|2|4|5|6)?|50)\s?(\d\s?){4,8}\d$/,
'fi-FI': /^(\+?358|0)\s?(4[0-6]|50)\s?(\d\s?){4,8}$/,
'fj-FJ': /^(\+?679)?\s?\d{3}\s?\d{4}$/,
'fo-FO': /^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/,
'fr-BF': /^(\+226|0)[67]\d{7}$/,
Expand Down
3 changes: 3 additions & 0 deletions test/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -7994,6 +7994,9 @@ describe('Validators', () => {
'0457 123 45 67',
'+358457 123 45 67',
'+358 50 555 7171',
'0501234',
'+358501234',
'050 1234',
],
invalid: [
'12345',
Expand Down

0 comments on commit 8233ff1

Please sign in to comment.