FormItem errors aren't working for FieldArray's
See original GitHub issueUsing this example from Formik https://jaredpalmer.com/formik/docs/api/fieldarray
If we pass errors with the same way back as they are structured inside values.
e.g.: values:
{
filters: [
{ name: undefined }
]
}
errors:
{
filters: [
{ name: "Required!" }
]
}
FormItem doesn’t catch the error. Mostly like because it’s expecting a flat level key name.
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
ant design custom Form List: How to handle Array inside an ...
List whenever I have an array of objects but the above value is different, because it is array inside an array and then...
Read more >DynamicForm (Smart GWT LGPL Edition API 13.0p (2022-12 ...
Returns whether there are currently any errors visible to the user for the specified field in this form, without performing any validation. void,...
Read more >Date field doesn't allow attributes [#2854722] | Drupal.org
My custom form date field is set up as follows: And the error ... If "because array defaults aren't merged" is true we...
Read more >Dynamic AngularJS Validation in ngRepeat - Mitch Valenta
You can do so by utilizing an array of, well, anything really. The reason being is that you aren't actually dependent on the...
Read more >Updates - FormValidation
elements, HTMLElement[], The array of current field elements ... The Bulma plugin doesn't add the error styles to select elements ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

You can clone this repository https://github.com/jannikbuschke/formik-antd-playground with the --recursive flag and have a good local test experience. Pls follow the README to get started (it should be very simple)
For some reason, usingformik-antd-playground.namealways appears as""which is really strange. Do you know why that could be?thenameinside thefieldobject is also""howeverprops.nameis actually the right nameI made a component on the app side minus the Form.Item part and it seems to be a Formik problem? Or maybe some kind of typescript issue that I’m not aware of. Basically, I can pass name to Field and Field’s props name remains""Seems as though the problem was in the original
namevariable after all. name was being passed but not destructured from props. I was confused because I’m not used to typescript so I assumedprops: { name: string; children: React.ReactNode } & FormItemPropswas destructuring it, but it wasn’t. So name was just an undeclared variable. No idea why that didn’t error on compile.Also sidenote, the default version of
formik-antdthatformik-antd-playgroundinstalls is0.8.2. I had to manually pull in the latest version.