feat: (isMobilePhone) add Cuba validation by pasagedev ยท Pull Request #1765 ยท validatorjs/validator.js
Added validation for Cuba on isMobilePhone.
referred issue: #1761
Checklist
- PR contains only changes related; no stray files, etc.
- README updated (where applicable)
- Tests written (where applicable)
how to write regex for specific country, can you help me with that?
First you must look for information about the mobile phone format for specific country. For this you can read information in Wikipedia if there is or look for some official page from that country.
Then for the regex construction I recommend you read Regular expressions from MDN Web Docs and look how others regex was build. Finally you can test it on online tools like regex101.
I hope I've helped you.
how to write regex for specific country, can you help me with that?
First you must look for information about the mobile phone format for specific country. For this you can read information in Wikipedia if there is or look for some official page from that country. Then for the regex construction I recommend you read Regular expressions from MDN Web Docs and look how others regex was build. Finally you can test it on online tools like regex101.
I hope I've helped you.
thank you for helping me, I know what to do now....
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for PR @pasagedev
LGTM ๐
Is your contribution related to hacktoberfest?
Thank you for PR @pasagedev
LGTM ๐
Is your contribution related to hacktoberfest?
Yes! It's a hacktoberfest contribution.
Thank you so much.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for your contrib! ๐
pasagedev
deleted the
add-validation-isMobilePhone
branch
theteladras pushed a commit to theteladras/validator.js that referenced this pull request
Oct 30, 2021This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters