question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Array field-level validation

See original GitHub issue

I’ve tried implementing array field-level validation but I get the following error when I try to delete the last item in the array Cannot set a numeric property on an object.

I would like to validate the FieldArray and also each subfield in the array.

Link to the codesandox .

As a side note I’ve also took a look at https://github.com/final-form/final-form/issues/35 but the proposed solution with record-level validation isn’t working with the latest versions of the library https://codesandbox.io/s/2pnv1x052y Also I find record-level validation much more repetitive and kind of unusable in a real app compared to having some functions for field-level validation

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
erikrascommented, Mar 27, 2018

No, but this is high on my list of examples to create, so it will get done soon.

2reactions
erikrascommented, Jun 6, 2018

Published fix in react-final-form-arrays@1.0.5.

Original sandbox with updated deps:

Edit 🏁 React Final Form - Array field-level validation

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dependent field-level validation in field arrays #35 - GitHub
Running field-level validation at the array-level does work, but then we loose the ability to show errors related to the collection as a...
Read more >
React Final Form - Array field-level validation - CodeSandbox
React Final Form - Array field-level validation. 1. Embed Fork Create Sandbox Sign in. Sandbox Info. React Final Form - Array field-level validation....
Read more >
How can I transform a Go validator.FieldLevel.Field() to string ...
This example uses a idea of string but how can I build to []string to iterate? arrays · validation · go · go-playground...
Read more >
Field-Level Validation Example - Redux Form
The parameters to the validation function are: value - The current value of the field; allValues - The values of the entire form;...
Read more >
Array field-level validation - - Bountysource
I've tried implementing array field-level validation but I get the following error when I try to delete the last item in the array...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found