Skip to content
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

Field component ignores validateOn props using external value changes #4451

Closed
2 of 5 tasks
DarrenXu94 opened this issue Sep 1, 2023 · 1 comment
Closed
2 of 5 tasks
Labels
🐛 bug Unintended behavior

Comments

@DarrenXu94
Copy link

What happened?

I have a <Field> component using :validateOnModelUpdate="false" and a v-model. Updating the v-model externally still triggers the Field component to run it's validation even when set to false. When I apply the rules prop to the Field instead of validation-schema to Form this works as expected.

Reproduction steps

  1. Create a Field component with yup validation but validateOnModelUpdate to false. Add validation to the Form component.
  2. Update the v-model of the Field using a button
  3. Notice the validation still runs

Version

Vue.js 3.x and vee-validate 4.x

What browsers are you seeing the problem on?

  • Firefox
  • Chrome
  • Safari
  • Microsoft Edge

Relevant log output

No response

Demo link

https://stackblitz.com/edit/vue-6pt4lq?file=src%2FApp.vue

Code of Conduct

@logaretm logaretm added the 🐛 bug Unintended behavior label Sep 1, 2023
@DarrenXu94 DarrenXu94 changed the title Field component ignores validatieOn props using external value changes Field component ignores validateOn props using external value changes Sep 6, 2023
@Kerimhan05
Copy link

image
image

validation fires on the first character input, why doesn't it only fire on onBlur?

Vue 3 + nuxt 3, VeeValidate@4.8.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants