feat: (isMobilePhone) add Cuba validation by pasagedev ยท Pull Request #1765 ยท validatorjs/validator.js

@pasagedev

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)

@pasagedev

@codecov

@Sidd2024

how to write regex for specific country, can you help me with that?

@pasagedev

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.

@Sidd2024

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....

tux-tn

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?

@pasagedev

Thank you for PR @pasagedev
LGTM ๐ŸŽ‰
Is your contribution related to hacktoberfest?

Yes! It's a hacktoberfest contribution.
Thank you so much.

profnandaa

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 pasagedev deleted the add-validation-isMobilePhone branch

October 30, 2021 08:35

theteladras pushed a commit to theteladras/validator.js that referenced this pull request

Oct 30, 2021

profnandaa pushed a commit that referenced this pull request

Oct 31, 2021

profnandaa pushed a commit that referenced this pull request

Oct 31, 2021