FA-96564 / Phone number formatting / Member archive
As-you-type ten-digit formatter: parentheses appear after three digits · case 04
Typing three digits shows "(555)" before the user continues.
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 |
|---|---|---|---|
| three digits stay bare | "(855)" | "855" | 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 ↗