Vue-material and Vee-validate does not work good together, error collection does not contain name of the input.
Use vee-validate on md-input tag.
For source code/Example please check this:
https://github.com/mubaidr/SPA-asp.net-api-vuejs-/blob/master/MBO/client/components/Account/Signup.vue
Not really sure, here is a small fiddle which have both working fine as far as I can tell, so I think its not a compatibility issue.
https://jsfiddle.net/1ux1eh51/1/
If you can create a fiddle to show the problem that would be great since I can't replicate your code into the fiddle easily.
Sure, here is the updated jsfiddle:
https://jsfiddle.net/epzrvuc1/
I have included both normal input tags and md-input tags (provided by vue-material), please note the resulting errors object does not contain filedname for md-input but the native input type works fine.
The only difference I see is that in the working example, no md-input component is present. The regular input tag is included inside a md-input-container.
The md-input component must conform to this spec: http://vee-validate.logaretm.com/examples#component-example
Edit: maybe the name prop is missing?
@spezzino Yes, the problem occurs only when md-input tag is used.
I don't understand what you mean by
maybe the name prop is missing?
I mean, In the component's source
`
class="md-input"
:type="type"
:value="value"
:disabled="disabled"
:required="required"
:placeholder="placeholder"
:maxlength="maxlength"
@focus="onFocus"
@blur="onBlur"
@input="onInput"
@keydown.up="onInput"
@keydown.down="onInput">
`
there is no name property
Source: md-input
Solution I've found:
add data-vv-name to your md-input component
Example: https://jsfiddle.net/epzrvuc1/2/
@spezzino Awesome, thank you so much!
Most helpful comment
Solution I've found:
add
data-vv-nameto your md-input componentExample: https://jsfiddle.net/epzrvuc1/2/