`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?canSubmit
flag that is false when any field is invalid and the form has been touched (canSubmit
istrue
until the form has been touched, even if some fields are "technically" invalid based on theironChange
/onBlur
props).
1 Reply
equal-jade•4mo ago
since untouched fields are pristine, you could additionally check if the form is pristine and not allow submitting in that case