validatorjs / validator.js

String validation
MIT License
23.12k stars 2.32k forks source link

Honduras regex in isMobilePhone is wrong #1981

Closed capdilla closed 2 years ago

capdilla commented 2 years ago

Describe the bug the regex of es-HN in isMobilePhone is incorrect, the correct regex should be /^(\+?504)?[9|8|3|2]\d{7}$/ the phone numbers can also start with 3 or 2

https://github.com/validatorjs/validator.js/blob/cfcf9113c69b97477c409909a8729fa8efa0d595/src/lib/isMobilePhone.js#L72

Additional context Validator.js version: 13.7.0

ademyan05 commented 2 years ago

Hey I was able to valid that as well, i am going to add the change and raise PR

ademyan05 commented 2 years ago

1983

rubiin commented 2 years ago

1983 has been merged, closing this. Watch out for next version