Replies: 1 comment
-
Either you could use a computed that returns vee-validate value if its filled with something otherwise returns undefined. Otherwise, create your own custom components and call Something like this: const { value, handleChange } = useField('someField');
function onInput(e) {
const val = e.target.value || undefined;
handleChange(val);
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, I use useField to connect the v-model to input's value. It start with undefined as default value but when the user touch and clear the input's value my v-model is set to
""
(empty) for string ornull
for number.This behaviour is not what I'd like to achieve.
How do I proceed to always have undefined if the field is empty even if the field is touched?
Thanks in advanced for your help 😀
Beta Was this translation helpful? Give feedback.
All reactions