fix(isMobilePhone): fix 'ms-MY' matching invalid numbers by pano9000 · Pull Request #2155 · validatorjs/validator.js

@pano9000 mentioned this pull request

Jan 23, 2023

WikiRik

WikiRik previously approved these changes Jan 23, 2023

Santhosh-Kumar-99

rubiin

rubiin previously approved these changes Jan 24, 2023

@pano9000

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

@rubiin rubiin removed the mc-to-land

Just merge-conflict standing between the PR and landing.

label

Jan 29, 2023

profnandaa