Vee-validate: Computed errors object is not updating

Created on 2 Nov 2017  路  4Comments  路  Source: logaretm/vee-validate

Versions:

  • VueJs: 2.5.2
  • Vee-Validate: 2.0.0rc21

Description:

More explanation and steps to reproduce provided in codesandbox

https://codesandbox.io/s/1y5w97rz43

All 4 comments

This is not related to errors object being not reactive, the alias works fine because the value is being sourced from the input itself.

However the color input is being set programatically, so it doesn't emit any events that vee-validate can use to trigger validation.

You can fix this by using v-model

https://codesandbox.io/s/j4pmj0kn15

Another approach is that you can dispatch the input event yourself whenever the value changes.

I can't use v-model in my particular scenario, so should I create a custom component for my color input, that emits input event?

Yep that would be better since you can reuse the component in other places as well.

Because of reusability and other uses cases I created this component to pick colors
https://github.com/saintplay/vue-swatches

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Youdaman picture Youdaman  路  3Comments

schel4ok picture schel4ok  路  3Comments

MaxMilton picture MaxMilton  路  3Comments

Hoagiex picture Hoagiex  路  3Comments

YamenSharaf picture YamenSharaf  路  3Comments