-
-
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
resetForm validates and shows errors after 4.9.0 #4323
Comments
A reproduction would help me determine if it is a bug or intended or something that should be implemented. Based on what you have mentioned here:
|
Thank you for your response and sorry for not providing a demo for the issue. Here is the reproduction of the error. If you change back to version 4.8.6 in the demo, you will see it works as before: https://stackblitz.com/edit/vee-validate-v4-custom-inputs-1vmt8z?file=src%2FApp.vue |
Doing this will make it work
That should not have worked ever. Downgrading to |
Sorry for the bug, I updated the demo to fix it. The problem I reported keeps happening. Steps to replicate:
|
Something about your Not really a bug, doing this will work in your case: if (newValue !== this.validator.value) {
handleChange && handleChange(newValue, true);
} |
That seemed to do the fix. Thank you for your help! I have found another problem after updating the same demo to 4.10.0. I set syncVModel to true, and the form is cleared properly and so on, but now the form is validated when mounted, showing errors even with the initial values. From what I can see, the validation is not triggered inside my handleValidatorChange function, so I think it may be something internal. |
That is indeed a bug, will fix it shortly and release a patch today. Thanks for reporting it! |
After updating to 4.9.0, resetForm now triggers watchers in my custom input components. When triggering these watchers, handleChange is executed, therefore generating validation errors.
I have seen from the code that 4.8.6 used to have an unwatch method.
Is there any workaround for this or a new configuration option?
The text was updated successfully, but these errors were encountered: