-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(isMobilePhone): Fix el-GR validation - Add missing ranges + correctly exclude certain ranges #2112
fix(isMobilePhone): Fix el-GR validation - Add missing ranges + correctly exclude certain ranges #2112
Conversation
oops, looks like I based my branch off a wrong branch, let me try to fix that, the README.md should not have been part of this PR EDIT: ok, fixed my previous mistake, sorry about that! |
Codecov ReportBase: 100.00% // Head: 100.00% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## master #2112 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 104 104
Lines 2308 2308
Branches 578 578
=========================================
Hits 2308 2308
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
35d28ab
to
c8ca440
Compare
update the RegExp to correctly match (and exclude) number ranges as per official ITU numbering plan: https://web.archive.org/web/20221205170159/https://www.itu.int/dms_pub/itu-t/oth/02/02/T02020000550002PDFE.pdf fixes validatorjs#2111
c8ca440
to
d897415
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Previous RegExp for el-GR had some flaws and was
a) missing some number ranges (like
685
, etc.)b) not excluding certain number ranges (i.e. overly permissive RegExp), like
692
or696
References:
Official Greek numbering plan on the ITU website, last updated in 2021:
https://web.archive.org/web/20221205170159/https://www.itu.int/dms_pub/itu-t/oth/02/02/T02020000550002PDFE.pdf
See #2111 for some more in-depth info
This fixes #2111
Checklist
Thank you!
[ ] README updated (where applicable)