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
We have many instances of useField in our application that were working fine in 4.11.8, but stopped working after upgrading to 4.13.2 when it comes to updating the errors object (and related objects, such as errorMessage).
Code snippets:
import { useField } from 'vee-validate'
const {
errors,
value,
errorMessage: errMess,
meta
} = useField<boolean | null>('isCustomer', (val) => val !== null, { syncVModel: true })
So the meta object shows that touched has been updated to true, and in the parent component, we display form.errors, which is initially empty and then displays { "isCustomer": "field_required" } after clicking on "Next". So the parent form detects the error, prevents correctly from moving to the next page, but somehow the useField instances don't catch that and don't update the errors properly.
Reproduction steps
Implement a useField validation (of boolean type in this case) with "isCustomer" as name
Implement a form with a "Next" button, with a required "isCustomer"
Click on "Next", and see that the form correctly detects the error, but that it's not reflected in the error values returned by the useField.
What happened?
We have many instances of
useField
in our application that were working fine in 4.11.8, but stopped working after upgrading to 4.13.2 when it comes to updating theerrors
object (and related objects, such aserrorMessage
).Code snippets:
Initially, we see the following in the template:
And after clicking on the "Next" button, we see:
So the
meta
object shows thattouched
has been updated totrue
, and in the parent component, we displayform.errors
, which is initially empty and then displays{ "isCustomer": "field_required" }
after clicking on "Next". So the parent form detects the error, prevents correctly from moving to the next page, but somehow theuseField
instances don't catch that and don't update theerrors
properly.Reproduction steps
useField
validation (of boolean type in this case) with "isCustomer" as nameuseField
.Version
Vue.js 3.x and vee-validate 4.x
What browsers are you seeing the problem on?
Relevant log output
No response
Demo link
No link
Code of Conduct
The text was updated successfully, but these errors were encountered: