Automattic / Automattic/jetpack

Gutenberg - Form block: restrict phone field to numeric data

Open
#11,459 0 comments 0 reactions 0 assignees View on GitHub
[Feature] Forms [Focus] Blocks [Pri] Low Enhancement
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.