canSubmit is true when the form is touched but an invalid onChange field is not touched
Describe the bug
According to the docs, "canSubmit is true until the form has been touched, even if some fields are "technically" invalid based on their onChange/onBlur props". As far as I understand, field-level validations will only change canSubmit when that field has been touched, whereas form-level validations will affect canSubmit when any field has been touched. It would be helpful if this distinction could be made clear in the docs.
The reason this happens is because the field validation has not yet run, so the first name field does not yet know it is invalid. Compare that to form validators which run when any field changes.
As far as I know, this is intended behaviour. However, you seem to be confused by the documentation on it, so this issue should target the misleading description.
The reason this happens is because the field validation has not yet run, so the first name field does not yet know it is invalid. Compare that to form validators which run when any field changes.
As far as I know, this is intended behaviour. However, you seem to be confused by the documentation on it, so this issue should target the misleading description.
Thanks for clarifying. I updated the description, but kept it in the same issue for context even though it's not a bug.
I suffer with same problem for required fields, I do thier validation in onMount but this show error messages, I want similar behavior to RHF where it compare validation with initial values, so it does not make error messages for somethings like those
I dont know but maybe onInit or edit onMount to dont fire errors for initial data