Vee-validate fires on page load and not @input or @blur
Closed this issue · 8 comments
Tell about your platform
- cleave.js version : 1.5.0
- Vue.js version : 2.6.10
- Browser name and version : Chrome 74.0.3729.169
- This package version : 2.1.2
Current behavior
On page rendered, the error notice for vee-validate required rule shows up.
Expected behavior
The error notice for required shouldn't come up except after @input or @blur
<b-form-group
label="Phone Number"
label-for="phone_number"
:state="errors.has('phone_number') ? 'invalid' : null"
:invalid-feedback="errors.first('phone_number')"
>
<cleave
v-model="user.phone_number"
:options="cleave_phone"
class="form-control"
id="phone_number"
v-validate="'required'"
data-vv-as="Phone Number"
name="phone_number"
placeholder="Phone Number"
></cleave>
</b-form-group>
I also set the option below for vee-validate
{
events: 'input|blur'
}
Hi, @papakay
Can you please isolate this issue from your current project and 3rd party dependencies.
Can you please share a minimal re-production on either jsfiddle or codesandbox.
Thanks.
@ankurk91 thanks immensely for your response.
I've reproduced this error using codesandbox.io. Please find below the link.
I told you to setup the demonstration without any 3rd party libraries, but you have been using nuxt.js.
This makes it hard to debug and complex
I was able to re-produce this issue with latest vee-validate 2.2.10
, (Broken since 2.2.3)
This used to work well with older version for example 2.2.2
, See here
Something has changed at vee-validate side for sure.
It needs more time to debug.
P.S.
The change log was helpful
@ankurk91 thanks immensely for your time and effort. Looking forward to the time when this issue can be resolved.
Cheers!
Hello @ankurk91, i really appreciate the great work you're doing. Please have you had time to investigate this issue?
Thanks.
@papakay
This issue has been fixed in version 2.1.3
https://jsfiddle.net/9ap6wqg2/1/
Thanks for waiting so long.