-
-
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(isMobilePhone): Added regex for Sudan ar-SD #2246
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6860,6 +6860,24 @@ describe('Validators', () => { | |
'0114152198', | ||
], | ||
}, | ||
{ | ||
locale: 'ar-SD', | ||
valid: [ | ||
'0128652312', | ||
'+249919425113', | ||
'249123212345', | ||
'0993212345', | ||
], | ||
invalid: [ | ||
'12345', | ||
'', | ||
'+249962662622', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This phone number is not invalid due to the regular expression so that's why the test is failing |
||
'+24946266262', | ||
'+24933221097', | ||
'0614152198', | ||
'096554', | ||
], | ||
}, | ||
{ | ||
locale: 'ar-TN', | ||
valid: [ | ||
|
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.
I do not see +249 90 XXX XXXX in the ITU document nor the other reference that Wikipedia uses, but we can add those if you have an alternative source (possibly from the Zain Sudan website). The numbers +249 1X XXX XXXX are not mobile phones so they should not be a part of this validator.
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.
+249 90 XXX XXXX is valid and +249 95 XXX XXXX isn't according to ITU's Sudan Numbering Plan, according to the same doc Sudani/Sudatel Sudan provides mobile services. The Wikiperdia page seems outdated, I will try to update 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.
Thanks for that new source. Do you happen to have an update to that as well? The presentation mentions problems with overlapping +249 100/11/12 and a planned solution but I'd like to know if that was implemented and what the current state is
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.
Unfortunately, I couldn't find any updated documents or articles concerning the overlapping issue. Either the solution wasn't publicated or not implemented yet. Cannot get in touch with either companies due to the current affairs.
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.
Let's keep it like this for now then, and we can see if in the future we can find more documentation on this. Just need to fix the tests and then we should be good
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 sorry but I don't know why the tests aren't passing. How can I fix it?