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/valibot not yet compatible with Valibot 0.31.0 #4756

Closed
matthew-dean opened this issue May 27, 2024 · 1 comment · Fixed by #4770
Closed

@vee-validate/valibot not yet compatible with Valibot 0.31.0 #4756

matthew-dean opened this issue May 27, 2024 · 1 comment · Fixed by #4770
Labels
✨ enhancement a "nice to have" feature

Comments

@matthew-dean
Copy link

Is your feature request related to a problem? Please describe.

Currently, @vee-validate/valibot and the latest published release of Valibot (currently 0.31.0-rc.5) cannot be used together. It looks like Valibot 0.31.0 has a number of API changes. A TypeScript error is thrown when trying to pass an object schema to toTypedSchema, which looks like:

Argument of type 'ObjectSchema<{ readonly groupName: SchemaWithPipe<[StringSchema<undefined>, TrimAction]>; readonly notes: StringSchema<undefined>; }, undefined>' is not assignable to parameter of type 'BaseSchema | BaseSchemaAsync'.
  Property '_parse' is missing in type 'ObjectSchema<{ readonly groupName: SchemaWithPipe<[StringSchema<undefined>, TrimAction]>; readonly notes: StringSchema<undefined>; }, undefined>' but required in type 'BaseSchema'.ts-plugin(2345)
index.d.ts(339, 5): '_parse' is declared here.

Describe the solution you'd like

I'm filing this as a feature request not as a bug because Valibot is still at RC-5 (so not technically a bug), but it looks like the API is stable enough to provide support.

Describe alternatives you've considered

No alternatives except not using latest Valibot.

@logaretm
Copy link
Owner

logaretm commented May 28, 2024

Valibot is a great project, I can bump the supported release but that would break older releases.

I will mark this as an enhancement and once valibot hits full release, I will happily bump it with confidence. I'm watching the valibot releases but would be great if you remind me or PR it if you have the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement a "nice to have" feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants