Replies: 1 comment 1 reply
-
We are doing something similar. Our Initially I was doing conditionals with Our form layout is loaded from an api call. Part of our parsing logic creates objects to track The logic also creates render objects for each field which is That Some of the skeleton / ideas are in a sandbox that I created for another discussion: Vee-validate Array field Validation See the discussion for more information on what some of the sandbox bits are intended to do. |
Beta Was this translation helpful? Give feedback.
-
Hi All 👋
I would like some help/suggestions on the best ways of conditionally hiding fields.
In an ideal world, I'd like to generate forms based on a schema that contains all information about the inputs including initial values, input type, dynamic component and validation logic preferably using Yup. I also like the idea of using the composition API for this.
I'm currently preventing fields from rendering by having a {hidden: boolean} flag on the input schema and then utilising v-if on the dynamic component.
The issue I run into is that the validation errors on a hidden field are still present even after I update the validationSchema that is passed to useForm().
Any help will be much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions