FA-96568 / Phone number formatting / Member archive
As-you-type ten-digit formatter: partial exchanges fall into the full mask · case 03
Four to six digits render with a dangling hyphen, e.g. "(555) 01-".
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 |
|---|---|---|---|
| fourth digit opens the area | "(755) 0-" | "(755) 0" | 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 ↗