I cannot get correctly properties from a $refs, feedbacks welcome ...
Vue template
<input name="title" ref="inputTitle" data-vv-delay="1000" v-validate.initial="'required|min:3'" :class="{'input': true, 'is-danger': errors.has('required') }" :value="title" @input="validating({ title: $event.target.value, id: id })"/>
console output
console.log('REFS: ', this.$refs.inputTitle)
REFS:
<input data-v-44a1f54e name="title" data-vv-delay="1000" class="input" data-vv-id="_o6kpv3eo7" aria-required="true" aria-invalid="false">
console.log('NAME: ', this.$refs.inputTitle.name)
NAME: title
BUT I get errors with :
1 - property is not found however it exists...
console.log('CLASS: ', this.$refs.inputTitle.class)
CLASS: undefined
2- aria-invalid is checked as an infix-operator by Lint ...
console.log('ARIA-INVALID: ', this.$refs.inputTitle.aria-invalid)
http://eslint.org/docs/rules/space-infix-ops Infix operators must be spaced
http://eslint.org/docs/rules/no-undef 'invalid' is not defined