One time I did this thing with an internal calibration program where the user had to type floats into a text box. I set it up so that every key stroke was validated so that the string in the box had to parse as a valid number within the assigned range at all intermediate steps.
Everyone hated that.