useVuelidate() does not update after changing nested validation rules
See original GitHub issueI use useVuelidate() from vuelidate-next (composition API) to collect all validations from nested components.
In parent component:
const v$ = useVuelidate()
The problem is that when rule validations in nested components change, the v$ in the parent component does not update. Why isn’t it reactive?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Advanced usage - Vuelidate
When using useVuelidate , Vuelidate will collect all validation $errors and $silentErrors ... Create a new, nested component with its own validation rules....
Read more >How to use vuelidate with vuetify 2 for nested data? Getting ...
$invalid will always return true even when user.no_nome is not empty. How can i make the validation works for user.no_nome and any other...
Read more >Vuelidate | A Vue.js model validation library
Simple, lightweight model-based validation for Vue.js. ... You can specify when input becomes dirty by using appropriate event on your input box.
Read more >Advanced Examples | Vuelidate-error-extractor - GitHub Pages
Nested objects with $each. When you need to validate a nested set of objects, you can use the $each config keyword inside Vuelidate...
Read more >A Guide To Vue 3 Form Validation - Vuelidate Tutorial
Vue Form Validation is an essential part of any form system. ... this rules variable has to update when its dependencies change.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Your rules must match the structure of the form state.
You are nesting
form
inside, which you shouldn’tThe rules are probably not getting updated, because that is done only once at the moment we call
useVuelidate
, so we pass the entire validation structure to the parent. I wonder if we can replace that efficiently…