Answer the question
In order to leave comments, you need to log in
How with vee validate to check for a mismatch in the value of the fields?
Hello! Maybe someone knows, you need to check for a mismatch between the login and password - that is, as a confirmation of the password, just the other way around, the login should not match the password. If this is a custom error, then it is not entirely clear how to run the check of both fields at the same time.
Answer the question
In order to leave comments, you need to log in
Maybe I didn’t understand something, but this is done in easy:
<input v-model="login">
<input v-model="password">
<button @click="regUser()">Зарегестрироваться</button>
<script>
...
methods:{
regUser(){
if (this.login == this.password) {
alert('логин не должен быть равен паролю');
return;
}
// ... остальной код для регистрации
}
}
...
</script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question