FIELD NOTES · ACCEPTANCE EXERCISES

A numeric keypad is not an input validation rule

The commissioning decision

A venue’s enquiry form asks for a four-digit access reference. The mobile keyboard looks suitable, but pasted letters can still enter a text field. Commission keyboard convenience and accepted data as two requirements, with a clear error message and an independent server check.

Source and claim boundary

Inputmode is a keyboard hint and does not enforce validity. A suitable type or explicit constraint is needed for the intended input contract. MDN · Checked 16 October 2026.

Filled synthetic acceptance cases

Synthetic teaching data, not client records. Review the inputs and expected outcomes before running the isolated browser exercise. On narrow screens, scroll the table.

InputCheckExpected
inputmode=numeric, value=ABCDNo explicit constraintNative validity can pass
pattern=[0-9]{4}, value=ABCDExplicit syntax constraintFail
pattern=[0-9]{4}, value=0123Four-digit stringPass without numeric coercion

How to verify beyond appearance

  1. Specify length, permitted characters and the meaning of leading zeroes.
  2. Compare hint-only and constrained fields using the fixture.
  3. Test paste and supported device keyboards, then reject invalid input independently at the endpoint.

Interpret the result

The browser result identifies a missing constraint, not a complete validation design. Keep keyboard observations separate from validity results because a desktop fixture does not display a phone keyboard. User-friendly instructions should describe the actual accepted format. Never interpret a visually numeric field as evidence that the receiving system has safe or complete data.

What this does not prove

The chosen four-digit format is synthetic, not an Australian postcode validation service or an authentication design.

Runnable fixture and handover record

Open the browser acceptance fixture · Read the test source。The fixture creates temporary elements with synthetic values inside the browser. It reads no account, uploads no file, and sends no email or form. Record the browser version, check name, observed value and pass state. Keep real integration evidence separate: a local pass is not a live delivery result.