final-form / final-form/react-final-form
[Wizard Validation] initialValue on non textfields breaks validation on the next pages
- Dominant language
- JavaScript
- Stars
- 7.4k
- Forks
- 497
- PR merge metrics
- No merged PRs in 30d
Description
### What is the current behavior?
Check codesandbox below:
https://codesandbox.io/s/trusting-tesla-bdqhk?file=/index.js
1. Fill the first and last names at page 1
2. Dont select any color. Leave default color as Red. Press next.
3. Press next again after (so you don't select any toppings). Notice that validation is for some reason skipped here. (bug)
4. No validation is applied after (bug). Unless you focus any fields
### What is the expected behavior?
It should not skip validation just because an initial value was set for the fields
### Sandbox Link
https://codesandbox.io/s/trusting-tesla-bdqhk?file=/index.js
Contributor guide
Research direction
Start by reproducing the issue in the linked CodeSandbox, following the four listed steps with the default color and no toppings. Trace the wizard's validation flow in the repository to identify why initialValue prevents validation on later pages; done means validation is applied without focusing fields and the reproduction no longer skips errors.
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
- 38/100