-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat(isMobilePhone): Add Monaco mobile phone numbers support #2697
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -8846,6 +8846,31 @@ describe('Validators', () => { | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| '+59061245789', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| locale: 'fr-MC', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| valid: [ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| '+37744123456', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| '+37745678901', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| '+37746234567', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| '+377612345678', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| '+377698765432', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| '37744123456', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| '37745678901', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| '37746234567', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| '377612345678', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| '377698765432', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| invalid: [ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| '37743123456', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| '+37747123456', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| '+37741123456', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| '+377512345678', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+8855
to
+8867
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| '+377612345678', | |
| '+377698765432', | |
| '37744123456', | |
| '37745678901', | |
| '37746234567', | |
| '377612345678', | |
| '377698765432', | |
| ], | |
| invalid: [ | |
| '37743123456', | |
| '+37747123456', | |
| '+37741123456', | |
| '+377512345678', | |
| '+37761234567', | |
| '+37769876543', | |
| '37744123456', | |
| '37745678901', | |
| '37746234567', | |
| '37761234567', | |
| '37769876543', | |
| ], | |
| invalid: [ | |
| '37743123456', | |
| '+37747123456', | |
| '+37741123456', | |
| '+377612345678', |
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
fr-MCpattern mixes different national-number lengths: the4[456]\d{6}branch matches 8 digits after377, but the6\d{8}branch matches 9 digits after377. This inconsistency is likely unintended and will accept numbers with different lengths depending on prefix. Please verify Monaco’s mobile number length and adjust the regex (and corresponding fixtures) so both branches reflect the correct national significant number length.