Getting vue.runtime.common.js?d43f:423 TypeError: Cannot read property 'split' of null(…) error.
Template used:
<div>
<input
type="text"
name="email"
v-model="form.email"
v-validate data-rules="required|email"
class="full-width"
:class="{'has-error': errors.has('email')}"
>
</div>
All data-* attributes have been prefixed with vv
so you should change data-rules to data-vv-rules.
Worked with data-vv-rules. Thanks!
I think this change (probably in the last beta iteration?) should be documented somehow. A small notice somewhere.
If someone's trying to see the full code:
{{ errors.first('email') }}
Working with:
VueJs: 2.1.10
Vee-Validate: 2.0.0-beta.17
It seems data-vv-rules is now deprecated. I tried to get the same result with v-validate:myProperty.initial="'required'" but it didn't work and I got the error mentioned above in the title.
@lucpotage same for me
Well I'm using data-vv-rules & I haven't had any problems with it. It's working fine for me although the doc says the data-vv-rules is deprecated. I was using vee-validate 2.0.0-beta.17 until I updated to 2.0.0-rc.3 yesterday and data-vv-rules works fine :)
@roshimon I decided to keep it for the time being since a lot of people are relying on it, but I would encourage newer users/projects to not use it.
@logaretm I see. Thank you for the information :)
@logaretm Thank u very much....this is small information but it is very important to know....u Earned a follower.;D
Most helpful comment
All data-* attributes have been prefixed with
vvso you should change
data-rulestodata-vv-rules.