FA-96572 / Phone number formatting / Member archive
As-you-type ten-digit formatter: overlong input is forced into the mask · case 02
Eleven national digits render as "(555) 012-34567".
Case contract
Input the digits typed so far. A leading 1 becomes the prefix "1 ". With more than ten remaining digits the raw input is returned. Up to 3 digits are shown bare; 4..6 as "(AAA) E.."; 7..10 as "(AAA) EEE-S...". The result is stripped of surrounding spaces.
Why this case matters
Input masks re-render on every keystroke; premature punctuation or a lost prefix makes the caret jump and corrupts what users type.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| too many digits after the prefix | "1 (655) 012-34562" | "165501234562" | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗