final-form / final-form/react-final-form

Validate on touch or submit

Open
#956 1 comment 7 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.4k
Forks
497
PR merge metrics
No merged PRs in 30d

Description

I want to show validation errors only after when form is touched or submitted. What is the standard way to manage this?

Currently I have this condition to render fields validation error.

`invalid && (field.touched || form.submitSuccess || form.submitError) `

Is this correct or is there a better way? Formik has validateOnRender property for example.

Thanks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.