0
I would like to know how to limit the maximum number entered in an input. For example: I want the largest number that can be typed to be 42, that is, if the user tries to type 43: either it would appear only the four, or, when typing the 4, it would display the 2, because the limit is 42, and the minimum is 1.
The result doesn’t necessarily have to be the one I mentioned, I just need her not to be able to type the number 43 onwards. If possible she can’t even using CTRL + V kkk, but any progress already helps me, follow the code I’m currently using with the same example, but it’s not working.
<input type="number" min="1" max="42">
Is your field in a form? Inside a <form>.
– Daniel Mendes