Vee-validate: Dynamic Scope not working :(

Created on 24 Jun 2017  路  6Comments  路  Source: logaretm/vee-validate

Dynamic Scope not working :(

Most helpful comment

@prsth Excuses? Your example does not use scopes It just toggles between inputs. Take a look here: http://vuejs.org/v2/guide/conditional.html#Controlling-Reusable-Elements-with-key

In short you need to add key attribute that is unique for each element that uses vee-validate and has conditional rendering.

I've updated the example to use keys and toggle between inputs after first time: https://jsfiddle.net/logaretm/m67d8f4x/31/

All 6 comments

Can you replicate it in a fiddle please?

This could be related to #123 which was re-introduced in rc.6 because of directive hooks change. I've patched that in a recent commit. if you can provide a fiddle so I can test the current solution against it. Thanks for reporting the issue.

https://jsfiddle.net/m67d8f4x/30/

Actually rc.5 and earlier also has the problem, but in other way. They return failed promise but error bag contains error for the wrong field.

@logaretm 1000 excuses but could you please comment about your plan of fixing this? We are running to our production date in a month and must to make a choice if we stay with vee-validate or have to try something else.

Thank you!!

@prsth Excuses? Your example does not use scopes It just toggles between inputs. Take a look here: http://vuejs.org/v2/guide/conditional.html#Controlling-Reusable-Elements-with-key

In short you need to add key attribute that is unique for each element that uses vee-validate and has conditional rendering.

I've updated the example to use keys and toggle between inputs after first time: https://jsfiddle.net/logaretm/m67d8f4x/31/

@logaretm you are awesome! Thank you!! :)

1000 excuses i meant sorry for disturbing)

Was this page helpful?
0 / 5 - 0 ratings