Closed vip30 closed 8 years ago
You can wrap the computed property with custom validator. see the below example: https://jsfiddle.net/oqpmwdx1/1/
But I am afraid that this settings will make the computed properties not reactive.
https://jsfiddle.net/kdvdvdze/9/
In your beginning example, (https://jsfiddle.net/kdvdvdze/8) the error message will show either the password field is changed or the confirm password field is changed.
But if we wrap the computed property with the validator, the validation will be triggered by confirm password field only Do you have any other idea about that? Thanks alot!
Here is the fiddle https://jsfiddle.net/pn4pojjw/
Supposing I have a data that call validate
<input v-validate="validate" :field="field1" />
{validate : { required: { rule: true, message: "Require It"} }
I would like to have a confirm password checking like this https://jsfiddle.net/kazupon/kdvdvdze/7/ I know that may need to use computed property, but how to insert the computed property in object?
Thanks!!