Is it currently possible to specify a v-validate directive on a field but prevent it from automatically validating on change? In some cases I think it's preferable to validate on form submission (aka manually, via this.$validators.validateAll()), instead of while the user types.
I know it's already possible to do async and arbitrary validation, but what if I want to use vee-validate's built-in validations asynchronously (email, for instance)?
It is already implemented but not released yet, It allows you to specify v-validate.disabled modifier to disable the attachment of all listeners, so it would only validate when you call validate or validateAll manually.
Was this feature implemented yet? Loving the new improvements, but can't get this to work...
@nickforddesign Actually the modifier has been named disable so you can do this v-validate.disable and yes it it is implemented since rc.1
I do see it working now, thank you. I am also noticing that with the disable modifier, when I do call this.$validator.validateAll(), the errors will remain the error bag until I remove them or call validateAll() again.
I am currently getting the desired result by adding watchers for each field that requires this type of validation (pretty much all of my forms), which feels a little less than optimal. Do you have any suggestions for how I could globally achieve the following effect for all fields that use the disable modifier?
```js
watch: {
password() {
if (this.errors.has('password')) {
this.errors.remove('password')
}
}
}
What exactly are you trying to achieve if I may ask, from what I understood you want to validate the fields manually by validateAll but you don't want the errors to remain in the error bag.
So what is the purpose of the validation in that case, furthermore you can add errors.clear in the catch callback of the validateAll promise.
@logaretm I'd like to validate the fields manually (on form submission), show the errors, but then as the user edits each input, I'd like the errors to be removed individually. By using a watcher, I don't remove the errors until the change event has fired.
I see, I guess there is no built-in way to achieve this, so you might have to add your own listeners for this.
Okay, no problem 馃憣
Is v-validate.disable mentioned somewhere in docs because I couldn't find it there or I'm missing something. The feature is very useful.
Is
v-validate.disablementioned somewhere in docs
https://baianat.github.io/vee-validate/guide/events.html#disabling-events-validation
Most helpful comment
Is
v-validate.disablementioned somewhere in docs because I couldn't find it there or I'm missing something. The feature is very useful.