Expose or bind to change on validation meta and errors #288
Comments
There have been various discussions about this in #276 and #204, also in other issues. This would require a big re-write and a major release for formvuelate to be able to do that. Sadly I'm struggling with finding the time to work on it at the moment. For this particular issue, there is a couple of things that need addressing:
// in setup
// how do we know "validation" is available? what if `vee-validate` or `vuelidate` plugins weren't installed?
const { validation } = useSchemaForm(); |
Ok I understand completely. Without Vee-Validate and/or Vuelidate things are much much different (and easier?) In the meanwhile: I got the following working:
This pattern makes me think of the ValidationObserver and ValidationProvider |
That would be a decent workaround albeit a little hacky. If it works for you then great.
Well that's a discussion for vee-validate itself. The short version, old API wasn't possible with Vue 3 so it made sense to re-think about everything in the next major release. |
Yep quite hacky, and as I experienced not 100% foolproof ( Very true, its a bit off-topic. I was just thinking out loud. |
(Vuetify3 beta 1) + Vee-Validate + FormVueLate + Zod
Is your feature request related to a problem? Please describe.
The problem is that currently the
validation
slotBind properties are not usable outside the SchemaFormWithValidation (VeeValidate extended Form). Its insanely hard to find a solution so far to be able to expose this to any component not inside the template.Describe the solution you'd like
Allow us to provide a reactive/ref/etc so we can track it (similar to :schema :validation-schema)
OR
Either expose the validation attribute over @change or an emitted property (similar to @submit)
OR
Bind it to an internal observer which we can expose at free will (MutationObserver)
Describe alternatives you've considered
The text was updated successfully, but these errors were encountered: