-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
Describe the bug
The el-GR locale of isMobilePhone is not validating all valid mobile phone number, but only a certain portion of valid numbers.
And for that one portion, it is also a bit too permissive.
The RegExp currently looks like this and only checks for numbers beginning with 69 (if we ignore the international code):
/^(\+?30|0)?(69\d{8})$/ (from isMobilePhone.js)
However there are quite a few more ranges that qualify as valid mobile phone numbers as per the national numbering plan of Greece |
(archived WaybackMachine Version) that is published on the ITU site, or (a lot more verbose, as it shows all of the different numer blocks: https://eregpublic.eett.gr/searchnum.php?lan=en)
- 690−1,
- 693−5,
- 697−9,
- 685−9
Aprt from the missing numbers, the current RegExp is currently also matching numbers beginning with 692, which would not be a valid phone number according to references above.
I'll raise a PR later today to get this fixed, this issue is just for reference.
Kind regards,
Pano