T
TanStack10mo ago
flat-fuchsia

canSubmit is true in onSubmit validator

I'm wondering why canSubmit is true when I choose onSubmit validation. Shouldn't be false because the form is not valid?
2 Replies
wise-white
wise-white10mo ago
Yes
absent-sapphire
absent-sapphire10mo ago
Using the onMount validator you can validate your form when it mounts and set it to invalid if needed - that way canSubmit will be false onSubmit runs after you submitted the form

Did you find this page helpful?