ITADN

array fields add validation status

#5106Opengimler 创建于 2025-12-29
G
gimlercommented
**Is your feature request related to a problem? Please describe.** I have my own collection component and use `FieldArray` to dis play a form with user objects (multiple fields) similar to https://vee-validate.logaretm.com/v4/examples/array-fields/. I need to know the validation status of all array items and also for each entry to highlight the entry that is invalid. I try `useIsFieldValid()` but it did not work because booth are not fields. **Describe the solution you'd like** * `useIsFieldValid()` also works with arrays and objects not only with fields or a alternativ method * extend fields with validation informations ``` <template> <FieldArray v-bind="attrs" v-on="$attrs"> <template #default="slotProps"> <slot name="default" v-bind="{ ...slotProps, }" /> </template> </FieldArray> </template> <script setup> import { FieldArray } from 'vee-validate' import { useAttrs } from 'vue' const attrs = useAttrs() </script> ```
1 条评论