Stating format requirements
When a field has rules that nobody states first, people find them out by failing.
The answer
Remove format rules where you can. Where you cannot, state them before people type. As strong as the weakest rule behind it: moderate.
-
If a field has format rules, state them before people type, in text outside the field.
A controlled experiment (166 people) found a stated rule cut first-submit errors to about a quarter of the no-hint level; a 65-person study applied it in a bundle that cut failed submits; WCAG 3.3.2 expects instructions; every design system read agrees. Skeptical pass: artificial rules in a lab, and Baymard reports most checkout testers ignored format examples, which bears on examples (rule 2) more than on stated rules. Held at 4.
- Applies when
- The system accepts only one format, or the field has rules.
- Based on
- Research
- Depends on
- How strict the format is
- Principle
- Prevent errors
- Common mistake
- A required format revealed only by an error after submit (rule 1).
- ExperimentsExperiment: Enhancing online forms: use format specifications for fields with format restrictions to help respondentsBargas-Avila, 2011
- Experiment: Designing Usable Web Forms: Empirical Evaluation of Web Form Improvement GuidelinesSeckler, 2014
- StandardsStandard: Understanding SC 3.3.2 Labels or InstructionsW3C WAI
- Standard: Form instructions (WAI Web Accessibility Tutorials)W3C Web Accessibility Initiative, 2024
- GuidanceGuidance: Hint text (NHS digital service manual design system)NHS England digital service manual
- Guidance: Text input component (GOV.UK Design System)Government Digital Service
-
Better still, drop the rule: accept input without separators, units or set spacing.
A nuclear-industry human factors guideline, GOV.UK, Baymard and Apple all point this way; none reports a comparison. Rated 3.
- Applies when
- The system can work out the value from what is typed.
- Based on
- Convention
- Principle
- Prevent errors
- User researchUser research: The credit card number field must allow and auto-format spacesLars Soderlund, 2025
- StandardStandard: NUREG-0700 Revision 4, Sections 2.1 and 2.2.5 (data entry, defaults, forms)U.S. Nuclear Regulatory Commission, 2026
- GuidanceGuidance: GOV.UK Design System, Ask users for phone numbersGOV.UK Design System
- Guidance: Improving AutoFill experiences for your forms (Safari developer documentation)Apple, 2026
The other rules
-
State the rule. Don’t rely on an example alone.
The same experiment found a rule beat an example alone, and adding an example to the rule gave no significant gain; Baymard reports 89% of testers typed a different format from the example shown. One controlled study, so 3.
- Applies when
- The system accepts only one format.
- Based on
- Research
- Depends on
- How strict the format is
- Principle
- Prevent errors
- Common mistake
- A required format shown only as an example inside the field (rule 2, and Placeholder text).
- ExperimentExperiment: Enhancing online forms: use format specifications for fields with format restrictions to help respondentsBargas-Avila, 2011
- GuidanceGuidance: Input masking for restricted form fields (phone, date, card)Edward Scott, 2017
- Guidance: Text input component (GOV.UK Design System)Government Digital Service
-
Link the instruction to its field in code so screen readers read them together.
What GOV.UK, NHS, Polaris and the W3C tutorial do. A technique for meeting 3.3.2, not itself required, so 3.
- Applies when
- Always.
- Based on
- Convention
- Principle
- Work for everyone
- StandardStandard: Form instructions (WAI Web Accessibility Tutorials)W3C Web Accessibility Initiative, 2024
- GuidanceGuidance: Text input component (GOV.UK Design System)Government Digital Service
- Guidance: Hint text (NHS digital service manual design system)NHS England digital service manual
- Guidance: TextField (Shopify Polaris)Shopify
-
State a length limit up front, let people type past it, and show how far over they are. Don’t cut text off silently.
Three government systems agree; GOV.UK cites one prototype test with 17 people. No study of counters was found. Rated 3.
- Applies when
- The field has a length limit.
- Based on
- Convention
- Principle
- Keep people in control
- Common mistake
- A field that silently stops accepting characters at its limit (rule 5).
- GuidanceGuidance: Character count component (GOV.UK Design System)Government Digital Service, 2026
- Guidance: Character count (NHS digital service manual)NHS England digital service manual
- Guidance: Character count component (USWDS)U.S. Web Design System
-
Listing password rules helps only if the rules should exist, and the evidence says they shouldn’t. See Password creation.
Studies show displayed composition rules cost time, failed first attempts and dropout, and even a stated length minimum was missed by many; none compares stated with unstated rules. Rated 2.
- Applies when
- The field is a new password.
- Based on
- Research
- Principle
- Prevent errors
- ExperimentsExperiment: Improving computer security for authentication of users: Influence of proactive password restrictionsProctor, 2002
- Experiment: Can Long Passwords Be Secure and Usable?Richard Shay, 2014
- StandardStandard: NIST SP 800-63B-4 Digital Identity Guidelines, Authentication and Authenticator Management (Sec. 4.2 Account Recovery; Sec. 3.1.1.2)NIST, 2025
Accessibility
- WCAG 2.2 · 3.3.2 · AInstructions are provided when input is required. Its Understanding document warns that too much instruction can also hinder.
- WCAG 2.2 · 4.1.3WCAG 2.2, 4.1.3 Status Messages (AA) applies to a live character count that updates without a focus change. Sources say to announce it sparingly, not on every keystroke; untested.
Open questions
- OpenNo systematic review, meta-analysis or published online experiment on stating input requirements was found.
- OpenRule against example: one study. Not tested on phones.
- OpenCharacter counters: no study found.
- OpenTwo survey-methodology studies on format labels were read only as abstracts.
Sources
- ExperimentsExperiment: Enhancing online forms: use format specifications for fields with format restrictions to help respondentsBargas-Avila, 2011
- Experiment: Designing Usable Web Forms: Empirical Evaluation of Web Form Improvement GuidelinesSeckler, 2014
- Experiment: Improving computer security for authentication of users: Influence of proactive password restrictionsProctor, 2002
- Experiment: Can Long Passwords Be Secure and Usable?Richard Shay, 2014
- User researchUser research: The credit card number field must allow and auto-format spacesLars Soderlund, 2025
- StandardsStandard: Understanding SC 3.3.2 Labels or InstructionsW3C WAI
- Standard: Form instructions (WAI Web Accessibility Tutorials)W3C Web Accessibility Initiative, 2024
- Standard: NUREG-0700 Revision 4, Sections 2.1 and 2.2.5 (data entry, defaults, forms)U.S. Nuclear Regulatory Commission, 2026
- Standard: NIST SP 800-63B-4 Digital Identity Guidelines, Authentication and Authenticator Management (Sec. 4.2 Account Recovery; Sec. 3.1.1.2)NIST, 2025
- GuidanceGuidance: Hint text (NHS digital service manual design system)NHS England digital service manual
- Guidance: Text input component (GOV.UK Design System)Government Digital Service
- Guidance: Input masking for restricted form fields (phone, date, card)Edward Scott, 2017
- Guidance: GOV.UK Design System, Ask users for phone numbersGOV.UK Design System
- Guidance: Improving AutoFill experiences for your forms (Safari developer documentation)Apple, 2026
- Guidance: TextField (Shopify Polaris)Shopify
- Guidance: Character count component (GOV.UK Design System)Government Digital Service, 2026
- Guidance: Character count (NHS digital service manual)NHS England digital service manual
- Guidance: Character count component (USWDS)U.S. Web Design System
Related
- When to validate a form fieldCheck on submit, and do not show an error until people have finished the field.Answer: moderate.
- Placeholder textDo not use placeholder text as a label or for instructions. Put both outside the field.Answer: moderate.
- Input masks and formatting as you typeAccept the separators people type and clean them up yourself, and show the expected shape outside the field.Answer: moderate.
- Password creationRequire length, not character mixes, allow password managers, and offer a way to show the password.Answer: moderate.
- Field width as a hintSize each field to the length of the answer you expect.Answer: moderate.