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): update phone regex for Ukraine uk-UA #2359
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2359 +/- ##
==========================================
- Coverage 99.95% 99.95% -0.01%
==========================================
Files 107 107
Lines 2454 2449 -5
Branches 619 619
==========================================
- Hits 2453 2448 -5
Partials 1 1 ☔ View full report in Codecov by Sentry. |
src/lib/isMobilePhone.js
Outdated
@@ -150,7 +150,7 @@ const phones = { | |||
'th-TH': /^(\+66|66|0)\d{9}$/, | |||
'tr-TR': /^(\+?90|0)?5\d{9}$/, | |||
'tk-TM': /^(\+993|993|8)\d{8}$/, | |||
'uk-UA': /^(\+?38|8)?0\d{9}$/, | |||
'uk-UA': /^(\+?38)?0(50|63|66|67|68|73|91|92|93|94|95|96|97|98|99)\d{7}$/, |
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.
'uk-UA': /^(\+?38)?0(50|63|66|67|68|73|91|92|93|94|95|96|97|98|99)\d{7}$/, | |
'uk-UA': /^(\+?38)?0(50|6[36-8]|73|9[1-9])\d{7}$/, |
Minor suggestion to reduce the length of the expression
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.
I changed and added two new mobile carrier codes
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.
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.
I'm not able to reach https://nkrzi.gov.ua/index.php?r=site/index&pg=99&id=2953&language=uk nor https://nkrzi.gov.ua/
Do you have a different website?
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.
https://nkrzi.gov.ua/ is an official site, it may not be accessible from other parts of Ukraine. If necessary, I can attach an image of these solutions from the official website.
Information about this is also available on the official website and on the official data page of mobile operators.
code 75
code 77
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.
Thanks for linking to the mobile operators. I'll try using a VPN later for the government website and approve afterwards
Minor suggestion to reduce the length of the expression аnd add two new mobile operators
Checklist
See more: International Telecommunication Union (ITU)