R
R
Ruslan Absalyamov2018-10-07 11:58:51
Vue.js
Ruslan Absalyamov, 2018-10-07 11:58:51

How to check for changes in an input?

There is a form validation if the data is entered incorrectly. it is necessary that it was impossible to submit the form if nothing has changed since the previous form submission. That is, if the answer is an incorrect password, then you need to change the password so that you can resubmit the form. Is it possible to do this somehow using an event or properties?
Here is an illustrative example https://jsfiddle.net/rusline/eywraw8t/407888/
There will be data there, as you understand, to check with the database, but this is approximately an illustrative example. Of course, I have an assumption that in data to store like old.username and also with a password, and then before submitting the form, check whether the error has been fixed or not, and if everything is good, then it clears old.username and old.password. I do it so that once again requests do not go to the backend.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-10-07
@rusline18

When changing user input, remove error information (can be done through watch or an additional input event handler ), and check for errors on submit.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question