Closed semivan closed 1 year ago
This is intended, setValues
will validate the entire form and not just the changed fields.
If you want to stop it from validating, pass false
as the second argument.
setValues({ field1: 'qwerty' }, false);
If it validated when setting the field value, even for the entire form, it would be good, but it doesn't work that way. The text 'qwerty' is > 5 characters, but the error is not displayed. The behavior is completely different; errors from all fields are displayed when one field is manually changed using the keyboard.
When the form is validated, all fields are marked as validated
. This means the next time the form is validated, errors will propagate to all fields, it is similar to submitting the form and then modifying a few values.
Schema validation validates the entire form every time and not just the changed field.
This is intended,
setValues
will validate the entire form and not just the changed fields.If you want to stop it from validating, pass
false
as the second argument.setValues({ field1: 'qwerty' }, false);
Hi everyone, I don't see that boolean parameters on the documentation https://vee-validate.logaretm.com/v4/api/use-form/, is it normal ?
What happened?
When changing one field, errors from all fields are displayed. If you comment out the line
setValues({ field1: 'qwerty' })
, then the behavior will become correct.Reproduction steps
No response
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
https://stackblitz.com/edit/vitejs-vite-ywb3go?file=src%2FApp.vue
Code of Conduct