-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v-validate:computedProperty does not validate properly on validateAll() #423
Comments
Are you binding the input value with the computed property? <input type="text" :value="computedProp" v-validate:computedProp="rules"> if not, do you mind trying and report the results? thanks. |
I use The custom component accepts an object instead of a regular String. It's the
That's why I needed to validate the computedProp because I can format it to a value that is compatible with the rules I am making. Again like I said, when only changing values it validates properly but when it comes to It's kind of not consistent. |
I replicated the issue here in a more simple version: http://jsfiddle.net/ye5hc7Lv/1/. Same result regardless of the value of If you manually (or using the |
Sorry for not being active in resolving the issue, The issue was caused by the validator not resolving the current value properly with computed values that are not bound to the elements, causing the It is currently resolved by treating the arg as a psudo model, by providing an arg it is the same as you provide a |
Have this issue with computed with set() and get() methods. getter isn't called after updates. |
i have the same issue when using set() and get() for computed property |
Versions:
Description:
I have a custom component, and I use
v-validate:computedProperty
instead of receiving the one that the componentemit
. It emits an object.It's fine when validates when changed. I have a custom rule and I checked why it fails. Rule is something like:
The
console.log
shows that computedProperty value on change/input. But when it's validated usingvalidateAll()
it shows the object being passed by the component.Steps To Reproduce:
1 - have a component
emit('input', {})
2 -
v-validate:computedValue={ rules: rules.yourRules }
3 -
computedValue() { return (!this.a || !this.b) '' : this.a + this.b }
4 -
validateAll()
EDIT:
Good thing
validateAll
accepts what to validate. I use it currently as a workaround.The text was updated successfully, but these errors were encountered: