Skip to content

🐛 Fix Russian numbers being detected as Kazakhstan numbers#188

Open
rezk2ll wants to merge 2 commits intoybrusentsov:developmentfrom
rezk2ll:russian-kasakh-area-code
Open

🐛 Fix Russian numbers being detected as Kazakhstan numbers#188
rezk2ll wants to merge 2 commits intoybrusentsov:developmentfrom
rezk2ll:russian-kasakh-area-code

Conversation

@rezk2ll
Copy link
Copy Markdown

@rezk2ll rezk2ll commented May 28, 2024

The problem

currently, Russian numbers are being guessed as Kazakhstani numbers.
it should display the Russian flag for Russian numbers.

Screenshot from 2024-05-28 14 24 23

since Russia and Kazakhstan share the same country code, the only way to differentiate between them is by using the area code. ( for Kazakhstan it's 600 to 799 ).

Under an agreement with Russia signed on 11 June 2006, Kazakhstan was assigned zone codes 6xx and 7xx (x = 0 to 9) under the unified plan.

What has been done

  • added Kazakhstan area codes ( starts with either 7 or 6 )
    Screenshot from 2024-05-28 14 19 53
  • changed the priority order to display Russian as the default country with a +7 country code ( required for the guessCountryByPartialNumber to change the country based on area codes )

Checklist before requesting a review

  • I have read the contributing doc before submitting this PR.
  • Commit titles correspond to the convention.
  • I have performed a self-review of my code.
  • Tests for the changes have been added (for bug fixes/features).
  • Docs have been added / updated (for bug fixes / features).

Screenshots (if appropriate):

Screenshot from 2024-05-28 14 17 24
Screenshot from 2024-05-28 14 17 07
Screenshot from 2024-05-28 14 16 51
Screenshot from 2024-05-28 14 16 38

@vercel
Copy link
Copy Markdown

vercel Bot commented May 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-international-phone-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2024 1:31pm
react-international-phone-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2024 1:31pm

@Kamover
Copy link
Copy Markdown

Kamover commented Jul 20, 2024

MAN YOU ARE AWESOME !!!!! THX GOD!!

@KhYaroslav
Copy link
Copy Markdown

can you submit these changes?

@fabiyi001
Copy link
Copy Markdown

@ybrusentsov Please review and approve this change

@ybrusentsov ybrusentsov force-pushed the development branch 2 times, most recently from 1e556e4 to 1f75150 Compare January 15, 2026 22:21
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.

4 participants