Skip to content

How to use vee-validate composition API to use the entire form fields in one reactive object? #4351

Answered by logaretm
Brunnn asked this question in Q&A
Discussion options

You must be logged in to vote

setValues doesn't validate as of 4.10 which is a bug. I will try to fix that shortly, it will accept an option whether you want to validate or not. I created an issue to track it here #4359

As for the original question, there are no reactive form values because how would you deal with nested values inside arrays? Flat objects or nested objects are straightforward but nested arrays usually cause the problem here and are not possible to use with TypeChecks since [0] could always be undefined and v-model doesn't work with nested undefined paths.

So if the workaround you did works for you, then it is all good, use it but be careful with arrays and similar scenarios.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@Brunnn
Comment options

@re2005
Comment options

Answer selected by Brunnn
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants