Vee-validate: Interaction Mode 'eager' should validate on 'blur' instead of 'change'

Created on 4 Apr 2019  Â·  1Comment  Â·  Source: logaretm/vee-validate

(...or maybe it's a bug?)

Is your feature request related to a problem? Please describe.

The validation provider mode='eager'. The initial event to trigger validation is therefor 'change'.

  1. The initial value is "ABCD" (valid).

  2. User changes it to "ABC" (not valid).

  3. When leaving the field the error is shown. Event to trigger validation is now switched to 'input'.

  4. User changes the value to "ABCE" (valid). The error is immediately cleared and event to trigger validation is switched back to 'change'.

  5. User changes the value back to "ABC" (not valid).

  6. When leaving the field there are no validations at all because the value hasn't changed since the field was entered!

So, that's a problem. As a workaround/solution I will probably make a custom mode that validates on 'blur' instead of 'change'.

✨ enhancement

Most helpful comment

I guess change was a poor choice since it does not work as expected, I will probably add both blur and change since some inputs do not emit blur.

>All comments

I guess change was a poor choice since it does not work as expected, I will probably add both blur and change since some inputs do not emit blur.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

schel4ok picture schel4ok  Â·  3Comments

MeltedFreddo picture MeltedFreddo  Â·  3Comments

biapar picture biapar  Â·  3Comments

Youdaman picture Youdaman  Â·  3Comments

Shchepotin picture Shchepotin  Â·  3Comments