Open 2u4u opened 3 years ago
Not sure if this is helpful:
I stumbled on this while having issues with react-final-form-html5-validation
In a FieldArray with field validation, if I remove any object except the last one, the validation seem to use the old object's data. E.g. I add two objects, then remove the first one, even if I insert valid data, the validation fails on exactly those fields that were not filled in for the removed object.
I was unable to create a sandbox to describe the problem because of the issue described by @2u4u, but downgrading to final-form-arrays 1.1.2, the issue with react-final-form-html5-validation went away in my project, so I suppose it is a problem in this library and not react-final-form-html5-validation.
FWIW here's the sandbox, but downgrading the library, it now works as expected: FieldArray with html5 validation
Are you submitting a bug report or a feature request?
Bug report
What is the current behavior?
Changing version of final-form-arrays in simple example causes error "Cannot read property 'validators' of undefined" in final-form. Steps to reproduce:
- "final-form-arrays": "1.1.2",
+ "final-form-arrays": "^1.1.2",
What is the expected behavior?
Project works properly
Sandbox Link
Simple example with changed final-form-arrays version