Skip to content

Conversation

@HassanAkbar
Copy link

@HassanAkbar HassanAkbar commented Aug 10, 2025

Fixes #3098
This Pull Request adds country_code to Estonia.
For Germany, its working as expected e.g,

Faker::Config.locale = :de
pp Faker::PhoneNumber.phone_number_with_country_code  # +49 245-1176794

It returns +49 which is an expected behavior.

Additional information

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Changes that are unrelated should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • Tests are added or updated if you fix a bug, refactor something, or add a feature.
  • Tests and Rubocop are passing before submitting your proposed changes.

If you're proposing a new generator or locale:

  • Double-check the existing generators documentation to make sure the new generator you want to add doesn't already exist.
  • You've reviewed and followed the Contributing guidelines.

@thdaraujo thdaraujo force-pushed the issue-3098-add-ee-country-code branch from a7efcd5 to cb456b2 Compare November 11, 2025 19:02
Copy link
Contributor

@thdaraujo thdaraujo 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!

def test_ee_cell_phone_with_country_code
phone_number = Faker::PhoneNumber.phone_number_with_country_code

assert_match /\+372\s?\d{3}\s?\d{4}/, phone_number
Copy link
Contributor

Choose a reason for hiding this comment

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

[Correctable] Lint/AmbiguousRegexpLiteral: Ambiguous regexp literal. Parenthesize the method arguments if it's surely a regexp literal, or add a whitespace to the right of the / if it should be a division.
    assert_match /\+372\s?\d{3}\s?\d{4}/, phone_number

Copy link
Author

Choose a reason for hiding this comment

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

@thdaraujo Thanks for review. Fixed 👍

@HassanAkbar HassanAkbar force-pushed the issue-3098-add-ee-country-code branch 2 times, most recently from 5e64d86 to 65b13d3 Compare November 12, 2025 06:23
@HassanAkbar HassanAkbar force-pushed the issue-3098-add-ee-country-code branch from 65b13d3 to 2c9e046 Compare November 12, 2025 06:24
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.

Generates incorrect phone numbers at least for Estonia and Germany.

2 participants