-
-
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
feat: add support for DR Congo mobile phone validation (fr-CD) #2041
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
If I check the ITU numbering plan (page 1), it looks like the regexp here would be too permissive.
Kindly check the ranges that were officially announced in that document and adjust your regexp accordingly please.
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.
Hey @pano9000, nice catch! thx for the feedback.
You should also note that: the above document is very old 😂(from 2009). Some MNOs in this list are no longer operational. And there are even new operators with different numbering structure.
But I think I can come up with something like
/^(\+?243|0)?(8|9)(0|1|2|4|7|8\9)\d{7}$/
, so telephones such as +243 902 XXXXXXX can pass the regex.What do you think about it?
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.
The most recent document provided to ITU is from 2013; https://www.itu.int/oth/T0202000037/en
That document is less clear than those of some other countries but looking at the communication of 15.IX.2010 I would propose the RegExp to be the following;
/^(\+?243|0)?(8[0-2|4|8|9]|9[7-9])\d{7}$/
.+243 902 XXXXXXX
does not seem to be valid from the official source of the ITU, but if you can provide one from the national authorities that do show that this should be valid we can look at a different RegExpThere 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.
Hey @WikiRik. My actual phone number is
+243 902 575 693
from Africel 😂