Skip to content
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

isMobilePhone returns true for +01112353576 when passing any as locale. Is this a bug? #1066

Closed
Youssefares opened this issue Jul 20, 2019 · 8 comments · Fixed by #2155
Closed
Assignees

Comments

@Youssefares
Copy link

Youssefares commented Jul 20, 2019

Is there a valid country dial code in this number? If so could you enlighten me 😄
This is the same for all numbers starting with +01 and having length 10 or 11 not counting the +.

This happens even with strictMode set to True.

@profnandaa
Copy link
Member

PR is welcome.

@ezkemboi
Copy link
Member

I will also try to do more investigation on this bug @Youssefares and @profnandaa.

@heiba
Copy link
Contributor

heiba commented Sep 6, 2019

@ezrqnkemboi @profnandaa Any update on this would be much appreciated

@ezkemboi
Copy link
Member

ezkemboi commented Sep 6, 2019

@heiba, let me get back to you tomorrow or the end of the day on this one.

Cc. @profnandaa.

@ezkemboi
Copy link
Member

ezkemboi commented Sep 7, 2019

@Youssefares, @heiba, your questions might be answered by Malaysia phone number :

'ms-MY': /^(\+?6?01){1}(([0145]{1}(\-|\s)?\d{7,8})|([236789]{1}(\s|\-)?\d{7}))$/,

Cc. @profnandaa.

@ezkemboi
Copy link
Member

ezkemboi commented Sep 7, 2019

@Youssefares for the question on This happens even with strictMode set to True.
That is because you have supplied +. Reference to that is the README docs.

@ezkemboi
Copy link
Member

@Youssefares and @heiba your feedback is needed here so that we can see if there is something we can do or we close this issue.
Check my comments above.

Cc. @profnandaa.

@pano9000
Copy link
Contributor

pano9000 commented Jan 23, 2023

issue is still valid and has also been reported here: #2055 (with an additional issue regarding +07 starting numbers)

@pano9000 pano9000 self-assigned this Jan 23, 2023
pano9000 added a commit to pano9000/validator.js that referenced this issue Jan 23, 2023
refactored the regexp:
---
* removed meaningless {1} quantifiers
* simplified regexp a bit (removing useless escape character)
* fixed the bug that would cause it to match invalid numbers

tests
---
* added tests for invalid numbers

fixes validatorjs#1066
pano9000 added a commit to pano9000/validator.js that referenced this issue Jan 28, 2023
refactored the regexp:
---
* removed meaningless {1} quantifiers
* simplified regexp a bit (removing useless escape character)
* fixed the bug that would cause it to match invalid numbers

tests
---
* added tests for invalid numbers

fixes validatorjs#1066
profnandaa pushed a commit that referenced this issue Jan 29, 2023
refactored the regexp:
---
* removed meaningless {1} quantifiers
* simplified regexp a bit (removing useless escape character)
* fixed the bug that would cause it to match invalid numbers

tests
---
* added tests for invalid numbers

fixes #1066
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants