PhoneInput: full country list + basic E.164 validation
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 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 内容生成。
描述
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.DisplayNamesto keep bundle size down. - Optional
countriesprop — allow consumers to restrict / reorder the list (e.g.["IN", "US", "GB"]), pluspreferredCountriespinned at the top. - Basic validation — strip formatting characters, enforce digits-only and E.164 max length (15 digits incl. country code); expose
aria-invalidand anonValidityChange(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
countriesfiltering and validation callback - Bundle size noted in the PR
- 主要语言
- TypeScript
- 星标
- 39
- 派生
- 16
- 平均合并
- 2 天 5 小时
- 30 天内合并 PR
- 12
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
babelize/babelize-elements 的其他 Issue
-
bug website
难度 2/5 1-3 小时 新手友好度 78/100
babelize/babelize-elements#46 ·
维护者通常 1 天内回复
-
bug language-switcher priority: medium
难度 2/5 1-3 小时 新手友好度 72/100
babelize/babelize-elements#26 ·
维护者通常 1 天内回复
-
component enhancement help wanted
难度 5/5 一周以上 新手友好度 35/100
babelize/babelize-elements#47 ·
维护者通常 1 天内回复
-
bug component rtl-layout
难度 3/5 1-2 天 新手友好度 68/100
babelize/babelize-elements#45 ·
维护者通常 1 天内回复
-
Website: revamp and improve the landing page可能已有人在做 @anjalinayak01 于 7 天前认领。 未关闭enhancement help wanted priority: medium website
难度 4/5 一周以上 新手友好度 30/100
babelize/babelize-elements#37 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 babelize/babelize-elements 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
jbacalso24/mimry#459 · 1 条评论 ·
维护者通常 1 天内回复
-
architecture help wanted hive/claimed-by-architect origin/architect stage/030-pr-in-progress tech-debt
难度 2/5 1-3 小时 新手友好度 78/100
kubestellar/console#24422 · 1 条评论 ·
维护者通常 1 天内回复
-
area: backends type: docs
难度 1/5 1-3 小时 新手友好度 83/100
schlessera/brain-kit#2383 ·
维护者通常 1 天内回复
-
agent duplicate providers tool triaged
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复