You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PhoneInput: full country list + basic E.164 validation #32
PhoneInput: full country list + basic E.164 validation
PhoneInput currently ships 50 countries, so users in most of the world (e.g. Sri Lanka, Nepal, Peru, Morocco, Ukraine) can't select their dial code.
Proposal
Full list — all ITU-T E.164 country codes (~245 entries). Flags can be derived from the ISO code rather than stored, and English names via Intl.DisplayNames to keep bundle size down.
Optional countries prop — allow consumers to restrict / reorder the list (e.g. ["IN", "US", "GB"]), plus preferredCountries pinned at the top.
Basic validation — strip formatting characters, enforce digits-only and E.164 max length (15 digits incl. country code); expose aria-invalid and an onValidityChange(valid, e164) callback. Full per-country rules (libphonenumber) stay out of scope to keep zero extra deps.
Acceptance
Test that every entry has a valid ISO code and +-prefixed dial code
Tests for countries filtering and validation callback
Activity
ujwalbajaj commentedon Oct 28, 2026
Hey @sapatmohit, I am interested to work on this, so can you just assign this issue to me!?
sapatmohit commentedon Oct 28, 2026
Its yours man, go ahead!