Validates a field with a value of undefined #57
Unanswered
sigridchen
asked this question in
Q&A
Replies: 1 comment
-
Thank you for your feedback. I would like to understand more clearly how your custom component is designed so I can better assist you in identifying and solving the issue. It would be great if you could provide a minimal reproducible example. I tried to create one based on your description, which you can fork and modify to demonstrate the difficulties you are encountering. https://stackblitz.com/edit/vitejs-vite-axcw2g?file=src/App.vue |
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
-
I wanted to thank you in advance for such a great package, much easier to use than similar packages!
Consider the following:
I'm planning to make a custom select component, but I'm having a hard time figuring out how to set the initial value to undefined in order to display the "Please select" text, while keeping the required validation of the field. I am planning to use the following method:
This does work, but there is the problem that the error state does not change immediately when options are changed, and the error state change is only responded to when other fields are changed.
Is there a way to set the initial value to undefined while maintaining the behavior of the validation enum? Thank you for your help!
Beta Was this translation helpful? Give feedback.
All reactions