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

feat: (isMobilePhone) add Cuba validation #1765

Merged

Conversation

pasagedev
Copy link
Contributor

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)

@codecov
Copy link

codecov bot commented Oct 9, 2021

Codecov Report

Merging #1765 (eb7b087) into master (13651ea) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1765   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          102       102           
  Lines         2029      2029           
  Branches       457       457           
=========================================
  Hits          2029      2029           
Impacted Files Coverage Δ
src/lib/isMobilePhone.js 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 13651ea...eb7b087. Read the comment docs.

@Sidd2024
Copy link

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

@pasagedev
Copy link
Contributor Author

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
Copy link

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

Copy link
Member

@tux-tn tux-tn left a comment

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?

@tux-tn tux-tn added 🎉 first-pr ready-to-land For PRs that are reviewed and ready to be landed labels Oct 14, 2021
@pasagedev
Copy link
Contributor Author

pasagedev commented Oct 14, 2021

Thank you for PR @pasagedev
LGTM 🎉
Is your contribution related to hacktoberfest?

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

Copy link
Member

@profnandaa profnandaa left a comment

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! 🎉

@profnandaa profnandaa merged commit 29ed3a0 into validatorjs:master Oct 30, 2021
@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎉 first-pr hacktoberfest-accepted ready-to-land For PRs that are reviewed and ready to be landed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants