i have an input text where i want to set value to only number from 1 - 10 only when the user types a value that is more than the text box will change it to 10 or when less than 0 the text will change to 0.and the text box will also not accept other values than number i used the code below for this but its not working it even accepts letters and no matter how what value i put in it it accepts the value what am i missing in this input text. is there a need of js just for this kind of problem?
<input type="number" min="0" max="10"/>