C
C
chelkaz2018-12-19 06:56:00
Vue.js
chelkaz, 2018-12-19 06:56:00

How in VUE js 2 to check the value of multiple input text of type keyup on the fly without a form?

There are many inputs with digital values. The user can change them.
For each input, there is a minimum and maximum value, which is stored in the data-max-val attributes eg.
Here the user took and began to enter 999999999 into the input
How to check it here and if the number is entered and it is greater than the maximum for this input, then replace it with the maximum.
Or, for example, the user began to enter anything - ropplorloro
How to check that this is not a number and replace it with the minimum that is stored at the input in the attribute, for example data-min-val I re-
read everything and reviewed the examples, but did not find the answer. I try through v-on:keyup="MyFunc"
But in the MyFunc function I can't get the value value and attributes.
I repeat, there are a lot of such inputs.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-12-19
@chelkaz

watch or handle the input event

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question