Open ferdiamg opened 3 years ago
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 60 days
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 60 days
+1, running into this issue with both .min()
and .max()
It appears there was a PR made to fix this issue in December, but was never merged https://github.com/formium/formik/pull/2994
Bug report
Current Behavior
I've got multiple checkboxes which are stored through a formik FieldArray in an array. Everything works fine with the validation when starting out and selecting >= 3 checkboxes. However when deselecting them all. Suddenly the error message from .min() is being split by its characters and pushed into the corresponding array?
This is the Yup validation:
and this is the FieldArray:
Expected behavior
The error array should be empty.
Reproducible example
Sadly not reproducible here.. maybe I am missing something: https://codesandbox.io/s/formik-codesandbox-template-forked-1kks9?file=/index.js
Suggested solution(s)
No idea sadly.
Additional context
Seems like the same is happening here: https://github.com/formium/formik/issues/3104
Your environment