Major Changes
- Release the first alpha of TanStack Form v2.
Minor Changes
-
#2426
395d61c- BREAKING:schemaOutputsno longer exists. It is superceded byvalidatorOutputs. This is only a name change, the schema's result is the same as beforevalidatorOutputsnow allows a callback validator to specify data that the submit function should know. Schemas do this
automatically, but now you can do it manually as well:
run: ({ createOutput }) => createOutput('This is not a validation error and onSubmit can use this')The current map is:
Validator onSubmit: ({ validatorOutputs }) => ...Schema Schema's output data createOutput(X)XDefault callback validator undefinedValidation error N/A, onSubmitdoesn't run
Patch Changes
-
Refactor: Adapter
formOptions/appFormOptionsno longer shim the core types and runtime.BREAKING:
formOptions.looseSchemaandformOptions.strictSchemanow require a schema as
first parameter. This locks down inference to get the best type safety out of it vs. the options object alone.Fix:
formOptions.looseSchemanow allowsdefaultValuesto omit properties instead of
requiring them to be explicitly undefined. -
Fix: Subscription selectors now infer tuple return values without requiring
as const. -
Updated dependencies [
584fcd9,a679245,395d61c,f8bbc25]:- @tanstack/form-core@2.0.0-alpha.3