Skip to content

feat(isMobilePhone): add Iceland phone validation and tests #2527

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jonreiland
Copy link

@jonreiland jonreiland commented Feb 8, 2025

A Regex validator has been added to /src/lib/isMobilePhone.js for Icelandic phone numbers, and added tests to /test/validators.test.js

I used this Wikipedia article as a reference, particularly the table included in the article which shows which numbers are valid for mobile phone numbers.

Checklist

  • PR contains only changes related; no stray files, etc.
  • README updated (where applicable)
  • Tests written (where applicable)
  • References provided in PR (where applicable)

@jonreiland
Copy link
Author

@evanbechtol Thanks for the review!

Copy link
Member

@WikiRik WikiRik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the document linked here, the following ranges are also allowed;
385 000 000 - 385 999 999
388 000 000 - 388 999 999
389 000 000 - 389 999 999

Can you add those to the regex and tests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants