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

Fields are not visited after failed submit (only touched)

Open
#760 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.4k
Forks
497
PR merge metrics
No merged PRs in 30d

Description

### Are you submitting a **bug report** or a **feature request**?
**bug report**

### What is the current behavior?

Fields marked only as "touched" on form submit with validation errors.

### What is the expected behavior?

Fields marked both "touched" and "visited" on failed form submit.

### Sandbox Link
https://codesandbox.io/s/epic-night-ckefb

### What's your environment?

Chromium 80.0.3987.132
"final-form": "4.18.7"
"react": "16.12.0"
"react-final-form": "6.3.5"

### Other information
Field marks "visited" when it got focused and "touched" when got and lost focus. If that's correct then same should happens on failed submit.

Contributor guide

Open the contributing guide

Research direction

Start with the linked CodeSandbox reproduction and verify the behavior using React Final Form 6.3.5, Final Form 4.18.7, and the reported Chromium environment. Trace the failed-submit handling and its touched/visited state, then confirm that validation errors leave affected fields marked both touched and visited.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.