TanStackT
TanStack•11mo ago•
5 replies
wispy-yellow

should blur trigger onChange validation?

Hey there, appreciate the library, was doing some form work and noticed I'm getting onChange validation errors when clicking into and then out of a field (but without changing the value). Looking at the code it seems like if a field was never previously touched, then blurring the field causes the "change" validation to run. Does this seem accurate? Did I miss something in the docs re: this behavior?

https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldApi.ts#L1602
GitHub
šŸ¤– Headless, performant, and type-safe form state management for TS/JS, React, Vue, Angular, Solid, and Lit. - TanStack/form
form/packages/form-core/src/FieldApi.ts at main Ā· TanStack/form
Was this page helpful?