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 4.13.1 (latest) not compatible with valibot 0.33.0 #4788

Closed
1 of 5 tasks
cmcnicholas opened this issue Jun 21, 2024 · 2 comments
Closed
1 of 5 tasks

Comments

@cmcnicholas
Copy link

What happened?

The following code produces the resulting type error:

  const validationSchema = toTypedSchema(
    v.object({
      email: v.pipe(
        v.nonOptional(v.string(), 'Email is required'),
        v.trim(),
        v.email('Must be a valid email'),
      ),
    }),
  );
Argument of type 'ObjectSchema<{ readonly email: SchemaWithPipe<[NonOptionalSchema<StringSchema<undefined>, "Email is required">, TrimAction, EmailAction<string, "Must be a valid email">]>; }, undefined>' is not assignable to parameter of type 'BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>'.
  Type 'ObjectSchema<{ readonly email: SchemaWithPipe<[NonOptionalSchema<StringSchema<undefined>, "Email is required">, TrimAction, EmailAction<string, "Must be a valid email">]>; }, undefined>' is not assignable to type 'BaseSchema<unknown, unknown, BaseIssue<unknown>>'.ts(2345)

Reproduction steps

  1. install latest valibot
  2. install latest vee-validate and vee-validate/valibot
  3. use the toTypedSchema method
  4. see resulting type error

Version

Vue.js 3.x and vee-validate 4.x

What browsers are you seeing the problem on?

  • Firefox
  • Chrome
  • Safari
  • Microsoft Edge

Relevant log output

No response

Demo link

n/a

Code of Conduct

@basitcodeenv
Copy link

Please add support for valibot 0.35.0

@logaretm
Copy link
Owner

logaretm commented Jul 5, 2024

Support for valibot 0.33.0 -> 0.36.0 is now available in v4.13.2

@logaretm logaretm closed this as completed Jul 5, 2024
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

3 participants