← Back to Catalog

Don't use type=number

dont-type-number

Do not use `type="number"` on Text Field — allows `e`/`+`/`-`/`.` and silently discards others; scroll increment is accidental. MUI points at GOV.UK number inputs. Dual-cite; do not invent a winner vs Apple number formatter. Fail native `type=number`. Formatted numeric control is Apple's claim, not a house pick.

Description

Do not put native `type="number"` on a Text Field: it allows `e`, `+`, `-`, and `.`, silently drops other characters, and makes scroll increment accidental. Those behaviors create surprising invalid or discarded input. Fail whenever the Text Field uses native `type="number"`. A formatted numeric control may exist as another claim—it is neither required nor banned here. Apply when collecting numeric values in an MUI Text Field.

When to use

Collecting numeric values in a text field.

Not when

Not for non-numeric text, or separate formatted numeric controls claimed elsewhere.

Agent hint

Avoid native type=number on Text Field; do not rely on its silent filtering.

Pass

The Text Field does not use native `type="number"`. A formatted numeric control may exist as Apple's claim — not required or banned here.

Fail

Native `type="number"` on the Text Field.

Citations

Open UX · cited UX rules agents audit against

Privacy · Sources ·