final-form / final-form/react-final-form-arrays
Field Array Validation Broken with latest version of FinalForm/RFF
- Dominant language
- TypeScript
- Stars
- 210
- Forks
- 69
- PR merge metrics
- No merged PRs in 30d
Description
With the latest update all validation breaks on Field Arrays. Only thing changed in entire project is the update of these 2 packages. If I remove those packages and do nothing else, it all works again. I would like to be able to use the new form property in onSubmit so I would like to update.
Steps to reproduce
---
1. Try touching the Name field, then lose focus. On the first you get required. On the second, the validate function never gets called.
2. Try adding multiple items in the array. Still no validation.
Examples
---
**Works**
"final-form": "^1.3.5",
"react-final-form": "^1.2.1",
[](https://codesandbox.io/s/1q618oqw83)
**Doesn't work**
"final-form": "^3.0.0",
"react-final-form": "^2.1.1"
[](https://codesandbox.io/s/8xo8yjvz69)
Contributor guide
Research direction
Start with the two linked CodeSandbox reproductions and compare the working final-form 1.3.5/react-final-form 1.2.1 setup with the failing final-form 3.0.0/react-final-form 2.1.1 setup. Trace Field Array validation around the Name field, blur handling, and adding multiple items; done means the validate function runs and reports errors in the newer setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100