I have an array like this
{
array: ["1", "4"]
}
but I want to add a yup validation to it -- if the array is empty - so at least one item is in the array
I've tried something like this - but its not working
myArray: yup.array().min(1). required("at least one item needs to be here")
are empty arrays always truthy? Yup: Validating Array of Strings That Can Be Empty
but this sandbox seems to work? https://codesandbox.io/s/serene-khorana-3pjmq?file=/src/index.js
https://codesandbox.io/s/lively-rgb-b2sct
here is the formik formframe work - with checkboxes -- shown - but when the checkboxes are not selected aka value is an empty array -- the error should show - but it doesnt?