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): es-CO locale, passing landlines as valid #1622

Closed
jhoalx opened this issue Mar 4, 2021 · 2 comments · Fixed by #1623
Closed

(isMobilePhone): es-CO locale, passing landlines as valid #1622

jhoalx opened this issue Mar 4, 2021 · 2 comments · Fixed by #1623

Comments

@jhoalx
Copy link

jhoalx commented Mar 4, 2021

Describe the bug
the regex in this commit is passing landlines as valid.
isn't the function isMobilePhone() intended to validate Mobile phones Only?

please refer to
Landlines: https://en.wikipedia.org/wiki/Telephone_numbers_in_Colombia#Landline_service
Mobile: https://en.wikipedia.org/wiki/Telephone_numbers_in_Colombia#Mobile_service

Examples
0698345 and 9821235 passes as valid, are (apparently) landlines, not mobile

Additional context
Validator.js version: 13.5.2 (imported in express-validator 6.10.0)
Node.js version: 14.15.4
OS platform: Arch Linux

@tux-tn
Copy link
Member

tux-tn commented Mar 4, 2021

@jhoalx Can you check the raised PR and confirm that the new regex is fixing the problem? I didn't find many sources concerning Provider prefix, i followed the wikipedia article explanation.

@jhoalx
Copy link
Author

jhoalx commented Mar 4, 2021

@jhoalx Can you check the raised PR and confirm that the new regex is fixing the problem? I didn't find many sources concerning Provider prefix, i followed the wikipedia article explanation.

Done: here

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.

2 participants