Research Guides
Verify a Decimal Threshold Before and After Saving
A research form might accept a whole-number threshold but reject a valid decimal, or accept a decimal and round it before saving. Test the exact value a researcher relies on at entry, after saving, and after reopening. Those are three different checks.
Write down the unit and accepted increments
Suppose a fictional review filter allows a minimum rating from 0 to 5 in increments of 0.1. The entered value 3.7 should be accepted; 3.75 should be rejected with a message that explains the allowed increment; 5.1 is outside the range. State those rules beside the field, not just in its error message. Pick values based on the product rule, not on what the current form happens to accept.
Check the browser rule, then the saved value
The HTML Standard’s number input rules default to an increment of 1 if no step is set. The base matters too: the increment is applied from the minimum if one is specified, or from another base under the standard’s rules. For the fictional filter, min="0" max="5" step="0.1" expresses the intended grid. A developer can inspect the field’s validity.stepMismatch when an in-range value fails, and check whether the server separately enforces the same business rule.
Enter 3.7, save it in a test draft, and reopen the draft. Confirm that 3.7 is still the applied threshold, not simply the number printed in the input. A small fixture with ratings of 3.6, 3.7, and 3.8 will expose whether the filter really includes ratings at or above 3.7. If a display later rounds a value for readability, keep that separate from the comparison itself. See how to keep display rounding out of research calculations.
Copy this check into a release note
Field and unit | typed value | expected validity | browser result | saved value | reopened value | rows included
Include one valid decimal, one in-range value off the allowed increment, and one out-of-range value. If the validation succeeds but the reopened value or results differ, describe it as a save or filtering problem rather than changing the input’s permitted increments to hide it.