… in making changes, a form or a wizard step needs a value with a strict, familiar syntax—such as a card number, licence key, or verification code—where forgiving format parsing would risk a costly misreading.
Problem
Typing a strict code or identifier into an undifferentiated box gives no clue about the expected syntax and invites transcription errors on long strings. Yet rigid input masks and split fields break copy-paste, reject valid regional formats, and defeat browser autofill.
Up-front formality pays off only when the syntax is genuinely fixed and ambiguity is costly. The common mistake is applying a rigid mask to values that only look uniform within one country—names, phone numbers, or postcodes—or building visual structure by splitting one value across separate inputs.
Solution
Signal the expected syntax and display long structured values in visual chunks of two to five characters whenever the format is genuinely strict and ambiguity is dangerous. Keep the underlying control a single pasteable input with standard semantic hints so actors can paste, edit, and autofill without fighting the mask.
Continuation
Follow entry with validation at the field, since a value that matches the syntax can still fail semantic checks such as an expired card or an unknown code. Adapt the shape through localization wherever formats vary by region, and preserve single-field semantics so autofill can supply stored records cleanly. Where the value must come from a fixed set rather than a formatted string, use bounded choice instead…
All connections
- Precedes
- Validation — Follow entry with validation at the field, since a value that matches the syntax can still fail semantic checks such as an expired card or an unknown code.
- Enacts
- Formality — structured format demands a fixed syntax up front so the control's shape communicates the rule and prevents ambiguity
- Complements
- Localization, autofill — Adapt the shape through localization wherever formats vary by region, and preserve single-field semantics so autofill can supply stored records cleanly.
- Alternatives
- Forgiving format — In making changes, a form or a wizard step needs a value with a strict, familiar syntax—such as a card number, licence key, or verification code—where forgiving format parsing would risk a costly misreading.
- Related to
- Bounded choice — Where the value must come from a fixed set rather than a formatted string, use bounded choice instead
- Hosted by
- Form
- Appears in
- Making changes: Designing the form, step 2
- Related components
- Input — the text-entry control that carries structured formatting and chunking.
Resources & references
- Tidwell, Brewer, Valencia (2020) Designing Interfaces, 3rd ed.
- UI Patterns — Structured Format
- GOV.UK Design System — Text input (avoiding split inputs and restrictive masks)