Compare the rule with concrete cases
Original fictional length field accepts 0 to 1000 mm inclusive in increments of 250 mm starting from zero. Allowed values are 0,250,500,750,1000. A value of 300 is within range but off-grid.
| Input mm | In range | On 250-mm grid | Validity |
|---|---|---|---|
| 250 | Yes | Yes | Valid |
| 300 | Yes | No | Invalid |
| 1000 | Yes | Yes | Valid |
Work through the distinction
Range and increment are independent checks. Specify the grid origin too: a grid starting at 50 would admit a different set of values.
Is 750 allowed, and is 1250 allowed?
Show the worked answer
750 is allowed. 1250 lies on the grid but exceeds the upper bound, so it is invalid.
Acceptance wording to adapt
Accept length_mm only when it is one of 0,250,500,750,1000. Reject off-grid or out-of-range values; do not silently round a submitted value to the nearest grid point.