I have a dynamic list of select inputs with the required rule on them. These select inputs use a certain scope. Within that scope, I also have a custom component that is not bound using v-model since it renders an array, so after the data for that component changes I just call validateAll(scope) on $nextTick because otherwise the initial validation for that custom component doesn't work. This works fine, but strangely enough when using validateAll(scope) the required rule on the list of select inputs breaks. This puts me in the awkward position that whether I add or remove validateAll, some validation is always broken. I may refactor all this code in the future, but in the meantime I don't think calling validateAll(scope) should break anything.
You are correct, calling validateAll shouldn't break or produce different results than the initial validation, I will take a look and report back. Probably the value resolution has issues with select inputs.
Thanks! :)
I found the problem, for starters it only occurs with Vue 2.4.3 and above, I think because of this change https://github.com/vuejs/vue/issues/6193
This is similar to #804 but not easily as fixable, because when you don't call validateAll the initial value is retrieved by the vnode which only happens initially. When you call validateAll the predefined getters are now the source of the value which for select elements aren't ready yet and so it receives an empty value.
Fixing it would require a different way of retrieving v-model bound values, preferably via the vnode data itself since it is isolated from all DOM cycles and the pain that comes with tracking them.
This has been fixed finally in the v3 branch, as the directive has been re-written.
Thanks @logaretm!