I\'m trying to use vee validate to verify the password using this code.
Your password input must have ref="password"
- that's how vee-validate finds the target:
(Thanks, Ryley).
confirmed:{target} - Input must have the same value as the target input, specified by {target} as the target field’s name.
Also, there's an error with your Vee Validate syntax, change target:
to confirmed:
v-validate="'required|target:password'"
should be
v-validate="'required|confirmed:password'"
Have a look at the basic example below, it will check for two things:
var app = new Vue({
el: '#app',
data: {
message: 'Hello Vue!'
}
})
body {
background: #20262E;
padding: 15px;
font-family: Helvetica;
}
#app {
width: 60%;
background: #fff;
border-radius: 10px;
padding: 15px;
margin: auto;
}
Further reading: https://baianat.github.io/vee-validate/guide/rules.html#confirmed