Automattic / Automattic/jetpack
Gutenberg - Form block: restrict phone field to numeric data
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
We received a request in #1846407-zen to be able to restrict the phone field in the Form block to accept numeric data only.
I did mention in my reply that this may be partly due to the way country codes are expressed, e.g. `+1`, `+44` rather than `001` or `0044`, but thought the request might be worth mentioning here.
Would something like an (optional) drop-down menu to select country code, then a numeric-only field for the number work?
Contributor guide
Research direction
The issue names the Gutenberg Form block but no files or tests; start by locating that block and reviewing how its phone field currently handles input. Clarify whether country-code selection and numeric-only validation are both required, then define completion around the agreed behavior and its coverage in tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wordpress
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100