-
vue: 3.2.7 I have one rule required and it works, but when i pass this rule field validation failed and i get "is not valid." message. How disable this rule. VersionVue.js 3.x and vee-validate 4.x Demo linkhttps://codesandbox.io/s/custom-text-input-with-vee-validate-v4-forked-8uo0hf?file=/src/App.vue |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This is not an issue. More of a question so I moved it to the discussions section. Well your condition is So whenever So you need to change your logic, this might give you what you want.
|
Beta Was this translation helpful? Give feedback.
This is not an issue. More of a question so I moved it to the discussions section.
Well your condition is
!v && "required!"
So whenever
v
is truthy it will evaluate to false and will then short-circuit tofalse
. Since that's not an error message thenis not valid
will be displayed because it is the default.So you need to change your logic, this might give you what you want.
https://codesandbox.io/s/custom-text-input-with-vee-validate-v4-forked-u6xonp?file=/src/App.vue:1085-1109