Answer the question
In order to leave comments, you need to log in
Why doesn't maxlenght work on number?
In an attempt to find the shortest way to indicate the maximum length of the input, I found such an example, but there is a problem, everything works as long as input type="text"
<input type="text" class="form-control" placeholder="Build Something Awesome" :maxlength="max" v-model="text" />
<input type="number" class="form-control" :maxlength="max" v-model="text1" />
Answer the question
In order to leave comments, you need to log in
input number has an attribute max - the maximum number that can be entered into it.
Plus there is a step parameter - the step of changing the number by pressing the arrows
There is also min
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question