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

Checkbox validation gets called twice #4702

Open
2 of 5 tasks
holygekko opened this issue Mar 15, 2024 · 0 comments
Open
2 of 5 tasks

Checkbox validation gets called twice #4702

holygekko opened this issue Mar 15, 2024 · 0 comments

Comments

@holygekko
Copy link

What happened?

When you have a field of type checkbox the validation rule(s) get called twice instead of once (like with a text input)

Reproduction steps

  1. open the example on the homepage in stackblitz
  2. in the schema definition remove the yup.object and make it a regular object
  3. create your custom rule function. can be anything, but include a console.log
  4. change the field type to checkbox
  5. open the console, run the example and see your log statement printed twice when you click the checkbox (the non checkbox field doesn't do this)

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://vee-validate.logaretm.com/v4/

Code of Conduct

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

No branches or pull requests

1 participant