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

Disabling validation doesn't work when Field has global rules #3156

Closed
Uninen opened this issue Feb 4, 2021 · 1 comment
Closed

Disabling validation doesn't work when Field has global rules #3156

Uninen opened this issue Feb 4, 2021 · 1 comment

Comments

@Uninen
Copy link

Uninen commented Feb 4, 2021

Versions

  • vee-validate: 4.1.13
  • vue: 3.0.5

Describe the bug

I have following field that has global validators as per documentation, it works correctly:

<Field
    name="password2"
    v-slot="{ field, meta }"
    rules="required|confirmed:@password1"
>

..but none of the validation modifiers actually change the validation as long as the global rules are in place.

<Field
    name="password2"
    v-slot="{ field, meta }"
    rules="required|confirmed:@password1"
    :validateOnBlur="false"
    :validateOnChange="false"
    :validateOnInput="false"
>

To reproduce

  1. Add field above - everything works
  2. Try to remove validation - it doesn't work, the field still validates

Expected behavior

After adding validateOnChange the field should not validate on change etc.

Desktop (please complete the following information):

  • OS: macOS 10.15
  • Browser Firefox 85
@logaretm
Copy link
Owner

logaretm commented Feb 6, 2021

Thank you for reporting this, The issue was related to the target rules ignoring the validation triggers. should be up in the next release.

Note that the field will still validate if the other target value changes.

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

2 participants