Define the measurement, not just the field

Imagine a Budapest glass-cutting workshop collecting requests for replacement panels. A field labelled Width leaves room for confusion: does it describe the opening or the finished panel, and is the unit centimetres or millimetres? Choose the intended measurement with the workshop and keep its unit visible while typing and reviewing.

Agree permitted ranges and increments for each dimension, plus how unknown measurements are represented. An empty field should not quietly become zero. Keep item quantity separate from dimensions. Record these decisions as examples the developer and workshop can both check, including values just inside and outside the accepted range.

Make decimal input predictable

Decide how the form handles decimal commas, decimal points and pasted numbers. If both 125,5 and 125.5 are accepted as the same measurement, demonstrate that explicitly. Avoid guessing when punctuation could represent either a decimal or a thousands separator; explain the accepted format and let the person correct an ambiguous entry.

MDN explains that inputmode can suggest a decimal keyboard without enforcing validation. Test actual phones and desktop browsers, including paste. A standard number field offers built-in constraints; a custom text field gives more control over accepted notation but adds parsing and validation work. Choose according to the required input rules.

Keep conversion separate from relabelling

For a test request, 125.5 cm represents 1255 mm. A switch from centimetres to millimetres should convert the value if it is intended to preserve the physical size. Simply changing the label would change the meaning. Show the converted measurement before saving, and specify what happens if a user switches units midway through typing.

Choose a consistent stored unit and an explicit precision policy with the developer. If an entry exceeds the permitted precision, decide whether to reject it or propose a rounded value for confirmation. Silent rounding hides a changed instruction. Test repeated unit switches so the measurement does not gradually drift.

Verify what is saved and displayed

MDN notes that browser validation does not replace server checks. Require the saved value and unit to satisfy the agreed rules even when a request bypasses the form. When a value is rejected, explain the correction needed and preserve the other entries so staff can finish the request.

Intl.NumberFormat supports locale-sensitive display. Treat that formatting as presentation: changing the interface language should not change the stored measurement. Compare the entry screen, confirmation and reopened record. If a compact summary rounds for display, make the full accepted measurement readily available wherever staff use it to carry out the work.

Approve a small set of awkward examples

Ask the team to demonstrate these cases using test records. Compare the final saved measurements with the expected values, not only the success message.

  • Enter decimal commas and points, following the agreed acceptance rules.
  • Paste an ambiguous number and check that the app asks for clarification.
  • Try empty, zero, negative and out-of-range dimensions.
  • Convert 125.5 cm to 1255 mm and back without changing the size.
  • Check excess precision and confirm any proposed rounding explicitly.
  • Change language, reopen the record and compare its value and unit.

Sources and further reading

← Back to Insights