You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a conditional field in a form that has a validation error message, when that field is unmounted due to v-for or v-if, that field error stays behind until the next full-form validation (pre-submit).
This only happens when fields have their own validation rules (field-level), this issue doesn't happen with form-level validation schemas.
Note that this only happens if you read the error value from useForm or Form.
To reproduce
Steps to reproduce the behavior:
Create a conditional field with v-if
Trigger a validation error for that field
Toggle the condition to false
Notice the error message stays behind
Expected behavior
The field error should be removed as long the field has no other instances (checkbox group, or radio)
For those interested, this issue occurs in vee-validate 4.4+ because of the internal changes to the error object which is no longer a "computed" object, when it was computed it used to take care of itself but now we should have a clean step for it.
The text was updated successfully, but these errors were encountered:
Versions
Describe the bug
Given a conditional field in a form that has a validation error message, when that field is unmounted due to
v-for
orv-if
, that field error stays behind until the next full-form validation (pre-submit).This only happens when fields have their own validation rules (field-level), this issue doesn't happen with form-level validation schemas.
Note that this only happens if you read the error value from
useForm
orForm
.To reproduce
Steps to reproduce the behavior:
v-if
false
Expected behavior
The field error should be removed as long the field has no other instances (checkbox group, or radio)
Demo link
https://codesandbox.io/s/fvlvee-validate-form-error-handling-5m4rt?file=/src/App.vue
Additional context
This issue was reported in formvuelate/formvuelate#210
For those interested, this issue occurs in vee-validate 4.4+ because of the internal changes to the error object which is no longer a "computed" object, when it was computed it used to take care of itself but now we should have a clean step for it.
The text was updated successfully, but these errors were encountered: