`canSubmit` behavior, invalid form submission
From these docs:
The form state object has aIs there a way to change that behavior? If not, what's the appropriate workaround for the "don't ever let 'technically' invalid forms be submitted" use case?canSubmitflag that is false when any field is invalid and the form has been touched (canSubmitistrueuntil the form has been touched, even if some fields are "technically" invalid based on theironChange/onBlurprops).
1 Reply
afraid-scarlet•7mo ago
since untouched fields are pristine, you could additionally check if the form is pristine and not allow submitting in that case