I own a canvas website and want my customers to be able to enter a custom length of the canvas within a set range.
Say the range for the product is:
- Minimum: 10 cm
- Maximum: 200 cm
Then in the text box they can enter any number between that range, but if they enter "215" then it should automatically go down to "200". Likewise if they enter "7" then it should automatically go up to "10"
maxlengthattribute, but there's no minlength. You can put some javascript in there to detect insufficient data, as long as you do the same check server-side afterwards.