We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
All of the other validators work with StandardSchemaV1, but onServerValidate doesn't.
n/a
// shared-code.ts import { formOptions } from "@tanstack/react-form/nextjs"; import { object, picklist } from "valibot"; export const formSchema = object({ animal: picklist(['cats', 'dogs']) }) export const formOpts = formOptions({ validators: { onSubmit: formSchema, }, });
// server-actions.ts "use server"; import { createServerValidate } from "@tanstack/react-form/nextjs"; import { formSchema, formOpts } from "./shared-code.ts"; const serverValidate = createServerValidate({ ...formOpts, onServerValidate: formSchema // incompatible object type })
It should be possible to use the same schema for both other validators and onServerValidate.
Every time
No response
n/a, applies to all platforms
None
0.41.3
5.7.3
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
All of the other validators work with StandardSchemaV1, but onServerValidate doesn't.
Your minimal, reproducible example
n/a
Steps to reproduce
Expected behavior
It should be possible to use the same schema for both other validators and onServerValidate.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
n/a, applies to all platforms
TanStack Form adapter
None
TanStack Form version
0.41.3
TypeScript version
5.7.3
Additional context
No response
The text was updated successfully, but these errors were encountered: