Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

PhoneInput: full country list + basic E.164 validation

オープン
#32 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
react, typescript

調査の方向性

The payload names no file, so start by locating the existing PhoneInput component and its 50-country list in the repository. Replace the list with the full E.164 set, add the optional countries and preferredCountries props, and add basic digits-only, 15-digit validation that sets aria-invalid and calls onValidityChange(valid, e164). Done when the tests check every entry's ISO code and dial code, filtering, and the callback, and the PR notes the bundle size.

索引モデルが issue の本文から書いたものです。

説明

enhancement help wanted priority: low

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
  1. 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.
  2. Optional countries prop — allow consumers to restrict / reorder the list (e.g. ["IN", "US", "GB"]), plus preferredCountries pinned at the top.
  3. 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
  • Bundle size noted in the PR
主要言語
TypeScript
スター
39
フォーク
16
平均マージ
2日 12時間
マージ済み PR(30日)
10

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

babelize/babelize-elements のほかの issue

babelize/babelize-elements の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。