Vee-validate: Interaction mode not working on nested input in Nuxt

Created on 29 Feb 2020  路  3Comments  路  Source: logaretm/vee-validate

Versions

vee-validate: 3.2.5
vue: 2.6.10
nuxt: 2.10.2

Describe the bug

When I add mode="eager" to ValidationProvider mode is not changed to eager. However default validation (i.e. aggressive) works when mode is not added.

To reproduce

Steps to reproduce the behavior:
Add mode="eager" to ValidationProvider and test on nested input field.

Expected behavior

Expect interaction mode to change to eager, however no validation takes place.

Demo link

https://codesandbox.io/s/veevalidate-325-mode-issue-08y7o

2020-02-29 05-11-29 2020-02-29 05_12_20

Most helpful comment

Yes, those are the most common events, you can check the docs for each mode, and ensure your component emit those events.

All 3 comments

The interaction modes rely on the validation target to emit the proper events to trigger validation.

In your case, your text-input component is only emitting the input event which is not enough for the mode to work properly. It has to emit all of the events expected by the mode to function correctly.

@logaretm what are the "other" events (change, blur, input) ?

Yes, those are the most common events, you can check the docs for each mode, and ensure your component emit those events.

Was this page helpful?
0 / 5 - 0 ratings