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: en-BM matches invalid numbers #2115

Closed
pano9000 opened this issue Dec 6, 2022 · 0 comments · Fixed by #2116
Closed

isMobilePhone: en-BM matches invalid numbers #2115

pano9000 opened this issue Dec 6, 2022 · 0 comments · Fixed by #2116

Comments

@pano9000
Copy link
Contributor

pano9000 commented Dec 6, 2022

Describe the bug
When passing a phone number that starts with 59 (after the country code), isMobilePhone will match invalid strings as valid

Examples
+14415974653 this should not match
isMobilePhone should return false, due to the additional string part, but currently it returns true.

Similar to #2113, this is caused by a missing end-of-string anchor in the RegExp.

PR with the fix coming in a few moments

pano9000 added a commit to pano9000/validator.js that referenced this issue Dec 6, 2022
that one particular number combination was missing the `$` end-of-string anchor, which caused the bug validatorjs#2115

fixes validatorjs#2115
pano9000 added a commit to pano9000/validator.js that referenced this issue Dec 6, 2022
pano9000 added a commit to pano9000/validator.js that referenced this issue Jan 28, 2023
that one particular number combination was missing the `$` end-of-string anchor, which caused the bug validatorjs#2115

fixes validatorjs#2115
pano9000 added a commit to pano9000/validator.js that referenced this issue Jan 28, 2023
profnandaa pushed a commit that referenced this issue Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant