# Stating format requirements

> When a field has rules that nobody states first, people find them out by failing.

Area: Forms. Evidence behind the answer: Moderate. Last checked November 12, 2026.
Page: https://uxreference.com/forms/format-requirements

## The answer

Remove format rules where you can. Where you cannot, state them before people type.

- **Strong.** If a field has format rules, state them before people type, in text outside the field. (https://uxreference.com/forms/format-requirements#rule-1)
- **Moderate.** Better still, drop the rule: accept input without separators, units or set spacing. (https://uxreference.com/forms/format-requirements#rule-3)

## The problem

When a field has rules, people who are not told them first find out by failing.

## How to decide

None. The sources do not describe more than one correct practice that depends on context.

## Every rule

Each rule has a grade: Settled (required by WCAG AA or law, or replicated research), Strong, Moderate, Weak, or Unsettled (use the stated default until the evidence settles).

#### Rule 1. Strong

If a field accepts only one format or has rules, state them before the person types, in text outside the field that stays available.

- 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

Why: 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](https://uxreference.com/forms/format-requirements#rule-2)) more than on stated rules. Held at 4.

Sources: [Enhancing online forms: use format specifications for fields with format restrictions to help respondents](https://doc.rero.ch/record/301906/files/iwc23-0033.pdf); [Designing Usable Web Forms: Empirical Evaluation of Web Form Improvement Guidelines](https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/42513.pdf); [Understanding SC 3.3.2 Labels or Instructions](https://www.w3.org/WAI/WCAG22/Understanding/labels-or-instructions.html); [Hint text (NHS digital service manual design system)](https://service-manual.nhs.uk/design-system/components/hint-text); [Text input component (GOV.UK Design System)](https://design-system.service.gov.uk/components/text-input/); [Form instructions (WAI Web Accessibility Tutorials)](https://www.w3.org/WAI/tutorials/forms/instructions/)

Link: https://uxreference.com/forms/format-requirements#rule-1

#### Rule 2. Moderate

State the requirement as a rule. Do not rely on an example alone.

- Applies when: The system accepts only one format.
- Based on: Research
- Depends on: How strict the format is
- Principle: Prevent errors

Why: 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.

Sources: [Enhancing online forms: use format specifications for fields with format restrictions to help respondents](https://doc.rero.ch/record/301906/files/iwc23-0033.pdf); [Input masking for restricted form fields (phone, date, card)](https://baymard.com/blog/input-masking-form-field); [Text input component (GOV.UK Design System)](https://design-system.service.gov.uk/components/text-input/)

Link: https://uxreference.com/forms/format-requirements#rule-2

#### Rule 3. Moderate

Where you can, remove the requirement instead of stating it. Accept input without making people type separators, units or a particular spacing.

- Applies when: The system can work out the value from what is typed.
- Based on: Convention
- Principle: Prevent errors

Why: A nuclear-industry human factors guideline, GOV.UK, Baymard and Apple all point this way; none reports a comparison. Rated 3.

Sources: [NUREG-0700 Revision 4, Sections 2.1 and 2.2.5 (data entry, defaults, forms)](https://www.nrc.gov/docs/ML2602/ML26022A094.pdf); [GOV.UK Design System, Ask users for phone numbers](https://design-system.service.gov.uk/patterns/telephone-numbers/); [The credit card number field must allow and auto-format spaces](https://baymard.com/blog/credit-card-field-auto-format-spaces); [Improving AutoFill experiences for your forms (Safari developer documentation)](https://developer.apple.com/documentation/safari-developer-tools/autofill.md)

Link: https://uxreference.com/forms/format-requirements#rule-3

#### Rule 4. Moderate

Tie the instruction to its field in code so that it is read out with the field.

- Applies when: Always.
- Based on: Convention
- Principle: Work for everyone

Why: What GOV.UK, NHS, Polaris and the W3C tutorial do. A technique for meeting 3.3.2, not itself required, so 3.

Sources: [Text input component (GOV.UK Design System)](https://design-system.service.gov.uk/components/text-input/); [Hint text (NHS digital service manual design system)](https://service-manual.nhs.uk/design-system/components/hint-text); [Form instructions (WAI Web Accessibility Tutorials)](https://www.w3.org/WAI/tutorials/forms/instructions/); [TextField (Shopify Polaris)](https://raw.githubusercontent.com/Shopify/polaris/main/polaris.shopify.com/content/components/selection-and-input/text-field.mdx)

Link: https://uxreference.com/forms/format-requirements#rule-4

#### Rule 5. Moderate

For a length limit, state the limit up front, let people type past it, and tell them how far over they are. Do not cut input off silently.

- Applies when: The field has a length limit.
- Based on: Convention
- Principle: Keep people in control

Why: Three government systems agree; GOV.UK cites one prototype test with 17 people. No study of counters was found. Rated 3.

Sources: [Character count component (GOV.UK Design System)](https://design-system.service.gov.uk/components/character-count/); [Character count (NHS digital service manual)](https://service-manual.nhs.uk/design-system/components/character-count); [Character count component (USWDS)](https://designsystem.digital.gov/components/character-count/)

Link: https://uxreference.com/forms/format-requirements#rule-5

#### Rule 6. Weak

Whether showing a list of password rules helps is tied to whether the rules should exist. See Password creation: the evidence is against composition rules.

- Applies when: The field is a new password.
- Based on: Research
- Principle: Prevent errors

Why: 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.

Sources: [Improving computer security for authentication of users: Influence of proactive password restrictions](https://link.springer.com/content/pdf/10.3758/BF03195438.pdf); [Can Long Passwords Be Secure and Usable?](https://core.ac.uk/download/357552058.pdf); [NIST SP 800-63B-4 Digital Identity Guidelines, Authentication and Authenticator Management (Sec. 4.2 Account Recovery; Sec. 3.1.1.2)](https://pages.nist.gov/800-63-4/sp800-63b.html)

Link: https://uxreference.com/forms/format-requirements#rule-6

## Accessibility requirements

- WCAG 2.2, 3.3.2 Labels or Instructions (A): instructions are provided when input is required. Its Understanding document warns that too much instruction can also hinder. (https://www.w3.org/WAI/WCAG22/Understanding/labels-or-instructions.html)
- WCAG 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. (https://www.w3.org/WAI/WCAG22/Understanding/status-messages.html)

## Common mistakes

- A required format revealed only by an error after submit ([rule 1](https://uxreference.com/forms/format-requirements#rule-1)).
- A required format shown only as an example inside the field ([rule 2](https://uxreference.com/forms/format-requirements#rule-2), and [Placeholder text](https://uxreference.com/forms/placeholder)).
- A field that silently stops accepting characters at its limit ([rule 5](https://uxreference.com/forms/format-requirements#rule-5)).

## Still open

- No systematic review, meta-analysis or published online experiment on stating input requirements was found.
- Rule against example: one study. Not tested on phones.
- Character counters: no study found.
- Two survey-methodology studies on format labels were read only as abstracts.

## Related problems

- [When to validate a form field](https://uxreference.com/forms/validation-timing): Check on submit, and do not show an error until people have finished the field.
- [Placeholder text](https://uxreference.com/forms/placeholder): Do not use placeholder text as a label or for instructions. Put both outside the field.
- [Input masks and formatting as you type](https://uxreference.com/forms/input-masks): Accept the separators people type and clean them up yourself, and show the expected shape outside the field.
- [Password creation](https://uxreference.com/forms/password-create): Require length, not character mixes, allow password managers, and offer a way to show the password.
- [Field width as a hint](https://uxreference.com/forms/field-width): Size each field to the length of the answer you expect.

## Sources

- [Enhancing online forms: use format specifications for fields with format restrictions to help respondents](https://doc.rero.ch/record/301906/files/iwc23-0033.pdf). Bargas-Avila, Orsini, Piosczyk, Urwyler, Opwis, 2011, between-subjects online experiment, four format-hint conditions, 15-field form.
- [Designing Usable Web Forms: Empirical Evaluation of Web Form Improvement Guidelines](https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/42513.pdf). Seckler, Heinz, Bargas-Avila, Opwis, Tuch, 2014, between-subjects eye-tracking lab experiment, original vs redesigned newspaper registration forms.
- [Understanding SC 3.3.2 Labels or Instructions](https://www.w3.org/WAI/WCAG22/Understanding/labels-or-instructions.html). W3C WAI, n.d., normative standard (Understanding document).
- [Hint text (NHS digital service manual design system)](https://service-manual.nhs.uk/design-system/components/hint-text). NHS England digital service manual, n.d., component documentation.
- [Text input component (GOV.UK Design System)](https://design-system.service.gov.uk/components/text-input/). Government Digital Service, GOV.UK, n.d., component documentation.
- [Form instructions (WAI Web Accessibility Tutorials)](https://www.w3.org/WAI/tutorials/forms/instructions/). W3C Web Accessibility Initiative, 2024, informative accessibility tutorial (not normative).
- [Input masking for restricted form fields (phone, date, card)](https://baymard.com/blog/input-masking-form-field). Edward Scott, Baymard Institute, 2017.
- [NUREG-0700 Revision 4, Sections 2.1 and 2.2.5 (data entry, defaults, forms)](https://www.nrc.gov/docs/ML2602/ML26022A094.pdf). U.S. Nuclear Regulatory Commission, 2026, normative human-factors review guidelines (control-room context).
- [GOV.UK Design System, Ask users for phone numbers](https://design-system.service.gov.uk/patterns/telephone-numbers/). GOV.UK Design System, n.d..
- [The credit card number field must allow and auto-format spaces](https://baymard.com/blog/credit-card-field-auto-format-spaces). Lars Soderlund, Baymard Institute, 2025, large-scale qualitative checkout testing plus benchmark (existing record in sources.yaml).
- [Improving AutoFill experiences for your forms (Safari developer documentation)](https://developer.apple.com/documentation/safari-developer-tools/autofill.md). Apple, 2026, component documentation (reused from the form.autofill gaps record).
- [TextField (Shopify Polaris)](https://raw.githubusercontent.com/Shopify/polaris/main/polaris.shopify.com/content/components/selection-and-input/text-field.mdx). Shopify, n.d., component documentation (GitHub markdown).
- [Character count component (GOV.UK Design System)](https://design-system.service.gov.uk/components/character-count/). Government Digital Service, GOV.UK, 2026, component documentation citing small prototype testing.
- [Character count (NHS digital service manual)](https://service-manual.nhs.uk/design-system/components/character-count). NHS England digital service manual, n.d., component documentation.
- [Character count component (USWDS)](https://designsystem.digital.gov/components/character-count/). U.S. Web Design System, GSA, n.d., component documentation with internal accessibility tests.
- [Improving computer security for authentication of users: Influence of proactive password restrictions](https://link.springer.com/content/pdf/10.3758/BF03195438.pdf). Proctor, Lien, Vu, Schultz, Salvendy (Behavior Research Methods, Instruments, & Computers 34(2), 163-169), 2002, two within-subject lab experiments (length-only rule vs length plus composition rules), counterbalanced.
- [Can Long Passwords Be Secure and Usable?](https://core.ac.uk/download/357552058.pdf). Richard Shay, Saranga Komanduri, Adam Durity, Phillip Huh, Michelle Mazurek, Sean Segreti, Blase Ur, Lujo Bauer, Nicolas Christin, Lorrie Cranor (Carnegie Mellon University), 2014, between-subjects online experiment, two sessions (create, recall after minutes and after two days), cracking simulation.
- [NIST SP 800-63B-4 Digital Identity Guidelines, Authentication and Authenticator Management (Sec. 4.2 Account Recovery; Sec. 3.1.1.2)](https://pages.nist.gov/800-63-4/sp800-63b.html). NIST, 2025, normative standard.

---
From Solved Problems in UX by Athen Pellicci, an evidence-graded reference of web interface problems. CC BY 4.0. https://uxreference.com/
