-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Unable to use v-binded values for data-* #9
Comments
Well Vue 2.0 removes directive params, so I had to use dataset as recommended by the VueJS documentation and also mainly because I didn't want to be any differences between the v1 and v2 dists. I believe it does not work because the validator only evaluates the dataset once it was bound by the directive. may I ask if those bound values are only for rendering purposes (don't change)? or are they subject to change at any moment? I might be able to come up with a solution if its the first case. |
Currently no expectation for them to change once rendered, just required as part of a I need to read up on directive changes for Vue2 as I was unaware of the deprecation of directive params. |
OK I might be able to do something about it. I will test few things and will get back to you later today or tomorrow. meanwhile here is a couple of links for Vue 2.0: vuejs/vue#2873 |
@Phunky Do you mind testing the latest commit? I tested few stuff and it appears its not happening with Vue 2.0. Vue 1.0 seems to have this issue, I've delayed the binding until the next tick which should have your bindings ready by then. I might change few things until the next v1 tag. |
I believe its fixed in the latest v1.x now. Feel free to re-open this issue or create a new one if this is not the case. |
Hey @logaretm, just gave latest release a test and it's working 👍 |
glad to hear, thanks for pointing this issue out. |
Due to the use of
this.el.dataset
instead of directive params it is not possible to use v-bind values for these attributes.The below does not currently work;
<input v-validate="value" v-model="value" :type='type' :name='name' :placeholder='placeholder' :modifiers='modifiers' :has="has" class="input" :data-rules="rules" :data-as="name">
The text was updated successfully, but these errors were encountered: