Skip to content
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

Vee-validate field context overwritten when using custom component library based on shadcn-vue #4989

Open
aherkov opened this issue Feb 17, 2025 · 0 comments

Comments

@aherkov
Copy link

aherkov commented Feb 17, 2025

Hi, we've been struggling with this issue for a while now.

We have a custom component library built using shadcn-vue and thus using vee-validate as a dependency for the input fields etc.
Vee-validate is added as a peer dependency in the comp lib.

When we add the lib in another project, we need to have vee-validate as a dependency as well to be able to use FormField etc.
However, this results in a breaking error which appears because Field Context is undefined (useFormField should be used within <FormField>).

I'm thinking this has something to do with having two symbols maybe?
The vee-validate versions are the same. It works when I export the entire vee-validate lib from our custom lib, however that isn't really the cleanest solution.

Happy to share more info if need and would appreciate any help with this, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant