Skip to content

Commit

Permalink
Fix fi-FI mobile phone number format to support 050xxxx numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
rapaantti committed Mar 28, 2022
1 parent c1b21a9 commit 1bb491c
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 @@ -80,7 +80,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 @@ -7835,6 +7835,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 1bb491c

Please sign in to comment.