You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using VeeValidate & yup with the Quasar framework. It seems like the attributes returned by a custom config method passed to defineField are not reactive to changed field requirements.
For example when using yups when you can make a field required only if another field is filled.
In the Demo provided below i tried to show this by using a custom class, which adds a red "star" to indicate when a field is required.
Only "email" is required by default and if it is provided "fullName" becomes required as well.
I would have expected that the attributes are updated according to dynamic schema changes. Especially since the config method is called for "fullName" when "email" is updated.
On a side-note: It seems if you remove toTypedSchema, it breaks completely and both fields are shown as not required. Not sure if this is a separate issue, but i would have assumed that the behavior should be the same.
There is a limitation on how well detecting required works because we analyze the schema initially and on subsequent changes but not during validations which will affect this.
I think it is doable but no ETA on this, would be great if someone wants to PR this.
What happened?
I am using VeeValidate & yup with the Quasar framework. It seems like the attributes returned by a custom config method passed to
defineField
are not reactive to changed field requirements.For example when using yups
when
you can make a field required only if another field is filled.In the Demo provided below i tried to show this by using a custom class, which adds a red "star" to indicate when a field is required.
Only "email" is required by default and if it is provided "fullName" becomes required as well.
I would have expected that the attributes are updated according to dynamic schema changes. Especially since the config method is called for "fullName" when "email" is updated.
Here is a small snippet for immediate reference:
On a side-note: It seems if you remove
toTypedSchema
, it breaks completely and both fields are shown as not required. Not sure if this is a separate issue, but i would have assumed that the behavior should be the same.Reproduction steps
No response
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/vee-validate-v4-quasar-framework-8qdp7l?file=src%2FApp.vue
Code of Conduct
The text was updated successfully, but these errors were encountered: