Skip to content

Commit

Permalink
fix(isMobilePhone): fix invalid RegExp for dv-MV
Browse files Browse the repository at this point in the history
The RegExp and corresponding tests were testing a wrong format.
Correct format can be found in the numbering plan:
https://web.archive.org/web/20220614004138/https://cam.gov.mv/docs/Numbering_plan.pdf

fixes issue #2101
  • Loading branch information
pano9000 committed Jan 28, 2023
1 parent f97e8d4 commit 7bcd2f0
Showing 1 changed file with 1 addition 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 @@ -30,7 +30,7 @@ const phones = {
'de-AT': /^(\+43|0)\d{1,4}\d{3,12}$/,
'de-CH': /^(\+41|0)([1-9])\d{1,9}$/,
'de-LU': /^(\+352)?((6\d1)\d{6})$/,
'dv-MV': /^(\+?960)?(7[2-9]|91|9[3-9])\d{7}$/,
'dv-MV': /^(\+?960)?(7[2-9]|9[1-9])\d{5}$/,
'el-GR': /^(\+?30|0)?6(8[5-9]|9(?![26])[0-9])\d{7}$/,
'el-CY': /^(\+?357?)?(9(9|6)\d{6})$/,
'en-AI': /^(\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\d{4}$/,
Expand Down

0 comments on commit 7bcd2f0

Please sign in to comment.