useFieldArray TS types #5079
Unanswered
MirasMustimov
asked this question in
Q&A
Replies: 0 comments
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.
-
Hello!
I am new to
vee-validate
.How do you get TS
path
checks foruseFieldArray
name
?I believe vee-validate is inspired by react-hook-form and their
useFieldArray
has optionalcontrol
parameter that comes fromuseForm
and carries useForm path types to useFieldArray so that you get validation that name exists and fields are of certain type.How to achieve something like that?
I know i can pass generic to useFieldArray but then there's no connection between the type and the name that you pass to useFieldArray and you kind of responsible for keeping the name and ts type in sync.
Love all the work done for vee-validate!
Beta Was this translation helpful? Give feedback.
All reactions