kazupon / vue-validator

:white_check_mark: Validator component for Vue.js
MIT License
2.19k stars 431 forks source link

Vue-Validator keeps old value when use with v-model #261

Closed whitecodewarrior closed 8 years ago

whitecodewarrior commented 8 years ago

Here is my code snippet.

<input type="text" v-validate:startdate="['required2']" v-model="current.start_at">
<month-year-picker :model.sync="current.start_at"></month-year-picker>

For test, I cloned built-in required validator, and found issue on it.

I don't change the input text content directly by typing text, and instead of doing it, tried to change v-model by synchronization on month-year-picker.

But while the v-model current.start_at value keeps new one, the required validator works with old value, that is, while current.start_at gets "01/01/2014", the entered value to required validator is "01/01/201", so keeps old 201 instead of 2014.

Is it unresolved issue or there is any solution of it?

I hope to get professional help from the vue-validator creators.

kazupon commented 8 years ago

Thank you for your reporting!! Can you provide the minimum reproduction code with jsfiddle or other please?

kazupon commented 8 years ago

Close (in-activity)