Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
a486ef4
refactor: set up abstract async manager
LeCarbonator Nov 3, 2026
060a40e
feat: allow runner to accept upstream invalidation
LeCarbonator Nov 4, 2026
96762dd
feat: add context builders for validation
LeCarbonator Nov 4, 2026
7c92773
feat: set up scaffolding for standard schema and function
LeCarbonator Nov 4, 2026
3c7f045
feat: make basic validator executor
LeCarbonator Nov 4, 2026
08a755b
refactor: add utils for trigger enabled state
LeCarbonator Nov 4, 2026
698a4fd
feat: add server pipeline runner
LeCarbonator Nov 4, 2026
3cb1efb
feat: add collection helper for promise resolution
LeCarbonator Nov 4, 2026
2db9f2a
feat: add validation tracker
LeCarbonator Nov 5, 2026
017cc15
refactor: inject new functions into existing work
LeCarbonator Nov 5, 2026
da5cbc6
refactor: make SSR use new system
LeCarbonator Nov 5, 2026
faefd8e
refactor: connect new implementation
LeCarbonator Nov 14, 2026
13329e5
chore: fix and add unit tests
LeCarbonator Nov 15, 2026
178cd98
fix: delete outdated file
LeCarbonator Nov 15, 2026
af03cf1
chore: add clarifying comment to LoC
LeCarbonator Nov 16, 2026
f7cc2d3
fix: ignore changed fields in submit error setting
LeCarbonator Nov 16, 2026
066f0f5
feat: improve onSubmitInvalid a bit
LeCarbonator Nov 16, 2026
cb247f4
refactor: centralize form and form group submission process
LeCarbonator Nov 18, 2026
0d14a4c
fix: fix wrong looseOptions check
LeCarbonator Nov 18, 2026
b10a036
refactor: clean up react-form tests
LeCarbonator Nov 18, 2026
9976fd0
fix: abort previous attempts instead of keeping both
LeCarbonator Nov 19, 2026
423438f
docs: improve JSDocs for FormApi
LeCarbonator Nov 19, 2026
31f0680
chore: fix unstable unit test fixture
LeCarbonator Nov 20, 2026
60bab8d
fix: centralize error resolution
LeCarbonator Nov 20, 2026
e9e3033
chore: fix assignment in subfields
LeCarbonator Nov 20, 2026
d5cfbb6
docs: redo JSDoc for events
LeCarbonator Nov 21, 2026
13fd5d4
fix: notify listeners properly on unrendered fields
LeCarbonator Nov 21, 2026
488c900
fix: fix group submit context type
LeCarbonator Nov 21, 2026
6bc5087
refactor: centralize flatMap calls in collector
LeCarbonator Nov 21, 2026
9887cfb
refactor: make group errors have parity with form error types
LeCarbonator Nov 21, 2026
1e7e0a8
chore: add .catch for examples
LeCarbonator Nov 21, 2026
e633f38
fix: fix stale devtools unit test
LeCarbonator Nov 22, 2026
155412a
ci: add changeset
LeCarbonator Nov 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .changeset/dry-turkeys-lose.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
'@tanstack/angular-form': patch
'@tanstack/form-core': patch
'@tanstack/form-devtools': patch
'@tanstack/lit-form': patch
'@tanstack/preact-form': patch
'@tanstack/react-form': patch
'@tanstack/react-form-start': patch
'@tanstack/solid-form': patch
'@tanstack/svelte-form': patch
'@tanstack/vue-form': patch
---

Removed duplicated logic for validators and listeners
2 changes: 1 addition & 1 deletion examples/angular/array/src/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,6 @@ export class AppComponent {
handleSubmit(event: SubmitEvent) {
event.preventDefault()
event.stopPropagation()
this.form.handleSubmit()
this.form.handleSubmit().catch(console.error)
}
}
2 changes: 1 addition & 1 deletion examples/angular/basic-splitting-form/src/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ export class AppComponent {
handleSubmit(event: SubmitEvent) {
event.preventDefault()
event.stopPropagation()
this.form.handleSubmit()
this.form.handleSubmit().catch(console.error)
}
}
2 changes: 1 addition & 1 deletion examples/angular/basic/src/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@ export class AppComponent {
handleSubmit(event: SubmitEvent) {
event.preventDefault()
event.stopPropagation()
this.form.handleSubmit()
this.form.handleSubmit().catch(console.error)
}
}
2 changes: 1 addition & 1 deletion examples/angular/large-form/src/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ export class AppComponent {

handleSubmit(event: SubmitEvent) {
event.preventDefault()
this.form.handleSubmit()
this.form.handleSubmit().catch(console.error)
}
}
4 changes: 2 additions & 2 deletions examples/angular/multi-step-wizard/src/step-one.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ export class StepOneComponent {
validators = [stepValidator(step1Schema)]
onSubmit = () => this.advance()()

submit(event: SubmitEvent, group: { handleSubmit: () => unknown }) {
submit(event: SubmitEvent, group: { handleSubmit: () => Promise<unknown> }) {
event.preventDefault()
event.stopPropagation()
group.handleSubmit()
group.handleSubmit().catch(console.error)
}
}
6 changes: 3 additions & 3 deletions examples/angular/multi-step-wizard/src/step-two.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ export class StepTwoComponent {
back = input.required<() => void>()
validators = [stepValidator(step2Schema)]
onSubmit = () => {
void this.form().handleSubmit()
void this.form().handleSubmit().catch(console.error)
}

submit(event: SubmitEvent, group: { handleSubmit: () => unknown }) {
submit(event: SubmitEvent, group: { handleSubmit: () => Promise<unknown> }) {
event.preventDefault()
event.stopPropagation()
group.handleSubmit()
group.handleSubmit().catch(console.error)
}
}
2 changes: 1 addition & 1 deletion examples/angular/query-integration/src/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,6 @@ export class AppComponent {
handleSubmit(event: SubmitEvent) {
event.preventDefault()
event.stopPropagation()
this.form.handleSubmit()
this.form.handleSubmit().catch(console.error)
}
}
2 changes: 1 addition & 1 deletion examples/angular/simple/src/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@ export class AppComponent {
handleSubmit(event: SubmitEvent) {
event.preventDefault()
event.stopPropagation()
this.form.handleSubmit()
this.form.handleSubmit().catch(console.error)
}
}
2 changes: 1 addition & 1 deletion examples/angular/standard-schema/src/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class AppComponent {
handleSubmit(event: SubmitEvent) {
event.preventDefault()
event.stopPropagation()
this.form.handleSubmit()
this.form.handleSubmit().catch(console.error)
}

// Keep the alternative Standard Schema implementations type-checked.
Expand Down
2 changes: 1 addition & 1 deletion examples/lit/array/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class TanStackArrayForm extends LitElement {
@submit=${(event: SubmitEvent) => {
event.preventDefault()
event.stopPropagation()
void this.form.api.handleSubmit()
void this.form.api.handleSubmit().catch(console.error)
}}
>
<button type="submit">Submit</button>
Expand Down
2 changes: 1 addition & 1 deletion examples/lit/basic-splitting-form/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class TanStackSplitForm extends LitElement {
@submit=${(event: SubmitEvent) => {
event.preventDefault()
event.stopPropagation()
void this.form.api.handleSubmit()
void this.form.api.handleSubmit().catch(console.error)
}}
>
${this.form.field({ name: 'firstName' }, (field) =>
Expand Down
2 changes: 1 addition & 1 deletion examples/lit/basic/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class TanStackBasicForm extends LitElement {
@submit=${(event: SubmitEvent) => {
event.preventDefault()
event.stopPropagation()
void this.form.api.handleSubmit()
void this.form.api.handleSubmit().catch(console.error)
}}
>
${this.form.field(
Expand Down
2 changes: 1 addition & 1 deletion examples/lit/large-form/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class TanStackPeopleForm extends LitElement {
<form
@submit=${(event: SubmitEvent) => {
event.preventDefault()
void this.form.api.handleSubmit()
void this.form.api.handleSubmit().catch(console.error)
}}
>
<h1>Personal Information</h1>
Expand Down
6 changes: 3 additions & 3 deletions examples/lit/multi-step-wizard/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class TanStackFormWizard extends LitElement {
@submit=${(event: SubmitEvent) => {
event.preventDefault()
event.stopPropagation()
void group.handleSubmit()
void group.handleSubmit().catch(console.error)
}}
>
${group.field({ name: 'name' }, (field) =>
Expand All @@ -64,15 +64,15 @@ export class TanStackFormWizard extends LitElement {
name: 'step2',
validators: [stepValidator(step2Schema)],
onSubmit: () => {
void this.form.api.handleSubmit()
void this.form.api.handleSubmit().catch(console.error)
},
},
(group) => html`
<form
@submit=${(event: SubmitEvent) => {
event.preventDefault()
event.stopPropagation()
void group.handleSubmit()
void group.handleSubmit().catch(console.error)
}}
>
${group.field({ name: 'name' }, (field) =>
Expand Down
2 changes: 1 addition & 1 deletion examples/lit/query-integration/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class TanStackQueryForm extends LitElement {
@submit=${(event: SubmitEvent) => {
event.preventDefault()
event.stopPropagation()
void this.form.api.handleSubmit()
void this.form.api.handleSubmit().catch(console.error)
}}
>
${this.form.field(
Expand Down
2 changes: 1 addition & 1 deletion examples/lit/simple/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class TanStackFormDemo extends LitElement {
@submit=${(event: SubmitEvent) => {
event.preventDefault()
event.stopPropagation()
void this.form.api.handleSubmit()
void this.form.api.handleSubmit().catch(console.error)
}}
>
<div>
Expand Down
2 changes: 1 addition & 1 deletion examples/lit/standard-schema/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export class TanStackSchemaForm extends LitElement {
@submit=${(event: SubmitEvent) => {
event.preventDefault()
event.stopPropagation()
void this.form.api.handleSubmit()
void this.form.api.handleSubmit().catch(console.error)
}}
>
${this.renderStringField('firstName', 'First Name')}
Expand Down
2 changes: 1 addition & 1 deletion examples/preact/array/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function ArrayForm({ items }: { items: Array<string> }) {
onSubmit={(e) => {
e.preventDefault()
e.stopPropagation()
form.handleSubmit()
form.handleSubmit().catch(console.error)
}}
>
<button type="submit">Submit</button>
Expand Down
2 changes: 1 addition & 1 deletion examples/preact/basic-splitting-form/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function App() {
onSubmit={(e) => {
e.preventDefault()
e.stopPropagation()
form.handleSubmit()
form.handleSubmit().catch(console.error)
}}
>
<form.Field name="firstName">
Expand Down
2 changes: 1 addition & 1 deletion examples/preact/basic/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function App() {
onSubmit={(e) => {
e.preventDefault()
e.stopPropagation()
form.handleSubmit()
form.handleSubmit().catch(console.error)
}}
>
{/* A type-safe field component*/}
Expand Down
2 changes: 1 addition & 1 deletion examples/preact/large-form/src/features/people/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const PeoplePage = () => {
<form
onSubmit={(e) => {
e.preventDefault()
form.handleSubmit()
form.handleSubmit().catch(console.error)
}}
>
<h1>Personal Information</h1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function Step1Form({ form, step, setStep }: Step1FormProps) {
onSubmit={(e) => {
e.preventDefault()
e.stopPropagation()
formGroup.handleSubmit()
formGroup.handleSubmit().catch(console.error)
}}
>
<formGroup.Field name="name">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ export function Step2Form({ form, step, setStep }: Step2FormProps) {
name="step2"
validators={[stepValidator(step2Schema)]}
onSubmit={() => {
form.handleSubmit()
form.handleSubmit().catch(console.error)
}}
>
{(formGroup) => (
<form
onSubmit={(e) => {
e.preventDefault()
e.stopPropagation()
formGroup.handleSubmit()
formGroup.handleSubmit().catch(console.error)
}}
>
<formGroup.Field name="name">
Expand Down
2 changes: 1 addition & 1 deletion examples/preact/query-integration/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function App() {
onSubmit={(e) => {
e.preventDefault()
e.stopPropagation()
form.handleSubmit()
form.handleSubmit().catch(console.error)
}}
>
<form.Field
Expand Down
2 changes: 1 addition & 1 deletion examples/preact/simple/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function App() {
onSubmit={(e) => {
e.preventDefault()
e.stopPropagation()
form.handleSubmit()
form.handleSubmit().catch(console.error)
}}
>
<div>
Expand Down
2 changes: 1 addition & 1 deletion examples/preact/standard-schema/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default function App() {
onSubmit={(e) => {
e.preventDefault()
e.stopPropagation()
form.handleSubmit()
form.handleSubmit().catch(console.error)
}}
>
<div>
Expand Down
2 changes: 1 addition & 1 deletion examples/react/array/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function ArrayForm({ items }: { items: Array<string> }) {
onSubmit={(e) => {
e.preventDefault()
e.stopPropagation()
form.handleSubmit()
form.handleSubmit().catch(console.error)
}}
>
<button type="submit">Submit</button>
Expand Down
2 changes: 1 addition & 1 deletion examples/react/basic-splitting-form/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function App() {
onSubmit={(e) => {
e.preventDefault()
e.stopPropagation()
form.handleSubmit()
form.handleSubmit().catch(console.error)
}}
>
<form.Field name="firstName">
Expand Down
2 changes: 1 addition & 1 deletion examples/react/basic/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function App() {
onSubmit={(e) => {
e.preventDefault()
e.stopPropagation()
form.handleSubmit()
form.handleSubmit().catch(console.error)
}}
>
{/* A type-safe field component*/}
Expand Down
2 changes: 1 addition & 1 deletion examples/react/compiler/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function App() {
onSubmit={(e) => {
e.preventDefault()
e.stopPropagation()
form.handleSubmit()
form.handleSubmit().catch(console.error)
}}
>
<div>
Expand Down
2 changes: 1 addition & 1 deletion examples/react/expo/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export default function App() {
<Button
title={isSubmitting ? '...' : 'Submit'}
disabled={!canSubmit}
onPress={() => form.handleSubmit()}
onPress={() => form.handleSubmit().catch(console.error)}
/>
)}
</form.Subscribe>
Expand Down
2 changes: 1 addition & 1 deletion examples/react/large-form/src/features/people/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const PeoplePage = () => {
<form
onSubmit={(e) => {
e.preventDefault()
form.handleSubmit()
form.handleSubmit().catch(console.error)
}}
>
<h1>Personal Information</h1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function Step1Form({ form, step, setStep }: Step1FormProps) {
onSubmit={(e) => {
e.preventDefault()
e.stopPropagation()
formGroup.handleSubmit()
formGroup.handleSubmit().catch(console.error)
}}
>
<formGroup.Field name="name">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ export function Step2Form({ form, step, setStep }: Step2FormProps) {
name="step2"
validators={[stepValidator(step2Schema)]}
onSubmit={() => {
form.handleSubmit()
form.handleSubmit().catch(console.error)
}}
>
{(formGroup) => (
<form
onSubmit={(e) => {
e.preventDefault()
e.stopPropagation()
formGroup.handleSubmit()
formGroup.handleSubmit().catch(console.error)
}}
>
<formGroup.Field name="name">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export const ClientComp = () => {
action={action}
onSubmit={async (e) => {
e.preventDefault()
const errors = await form.handleSubmit()
if (errors.length === 0) {
const errors = await form.handleSubmit().catch(console.error)
if (errors && errors.length === 0) {
e.target.submit()
}
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export const ClientComp = () => {
action={action}
onSubmit={async (e) => {
e.preventDefault()
const errors = await form.handleSubmit()
if (errors.length === 0) {
const errors = await form.handleSubmit().catch(console.error)
if (errors && errors.length === 0) {
e.target.submit()
}
}}
Expand Down
4 changes: 2 additions & 2 deletions examples/react/nextjs/app/client-component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export const ClientComp = () => {
action={action}
onSubmit={async (e) => {
e.preventDefault()
const errors = await form.handleSubmit()
if (errors.length === 0) {
const errors = await form.handleSubmit().catch(console.error)
if (errors && errors.length === 0) {
e.target.submit()
}
}}
Expand Down
Loading
Loading