-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
meta.required
not detected when validation schema is passed after useForm()
is called
#4738
Closed
5 tasks done
Comments
Hello, thanks for reporting this. I found a quick fix or it and will tag a release in a couple of hours. And I appreciate the clear demo. |
logaretm
added a commit
that referenced
this issue
May 6, 2024
This was referenced May 27, 2024
This was referenced Jun 26, 2024
This was referenced Sep 12, 2024
This was referenced Sep 20, 2024
This was referenced Oct 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happened?
In some use cases there is need to assign validation schema to
useForm()
afteruseForm()
is called. It is useful when you load validation schema from an external resource. We specifically need to pass validation schema afteruseForm()
, because we have multi step form Wizard, which usesinject/provide
API, where each component represent single step of multi step form and each component injects validation schema to parent, when is mounted.Since you can pass
Ref
to validation schema property inuseForm()
, which indicates that validation schema might change, I would expect that passing typed schema should work also with correctmeta.required
on each input.Is it possible to make
meta.required
working even if we pass validation schema afteruseForm()
or ideally, couldn'tmeta.required
property refresh when validation schema change is detected?Reproduction steps
Version
Vue.js 3.x and vee-validate 4.x
What browsers are you seeing the problem on?
Relevant log output
No response
Demo link
https://stackblitz.com/edit/vue-z6mle2?file=src%2FApp.vue
Code of Conduct
The text was updated successfully, but these errors were encountered: