The application interface I am working on has an slider to select a number, but offers a text input field next to it. This allows reading the currently selected value, but also supports keyboard input, alternatively. The sliders have range limitations that get enforced by the slider range when dragging the slider, but separately validated once the user blurs the input field, if they use keyboard input.
The thing I am struggling with is a feature to automatically correct the number input while the user types. This is not absolutely necessary, but with the slider interactively changing some results, it would be nice to constantly have a valid value.
With numbers greater than the maximum limit, it is quite easy to make the number simply reset to the maximum. However, when there is a minimum limit, this auto-correcting becomes harder to handle:
Imagine the limit would be
0-145. The user starts typing
1. So far so good. Then follows input
5 and the number
215 being greater than 145 means the input and slider get reset to
But if the limit would be
15-145: Any number the user types will start with a single digit and thus be smaller than the minimum limit of
15. What are possible options to deal with this?