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
continuing-cyan•12mo ago
Yes
other-emerald•12mo 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