Describe the bug
When I setup validation scheme with the operator "when" I received an error.
formik.es6.js:6198 Uncaught (in promise) TypeError: Cannot read property 'length' of undefined
at yupToFormErrors (formik.es6.js:6198)
at formik.es6.js:5933
To Reproduce
You can open codesandbox link and try to edit any fields. It will receive an error.
The reason it fails here is because the "when" is looking for an "isBig" sibling, which does not exist in your schema. If you simply add, "isBig: Yup.boolean()," to the schema above the "count" definition, everything seems to work.
Most helpful comment
The reason it fails here is because the "when" is looking for an "isBig" sibling, which does not exist in your schema. If you simply add, "isBig: Yup.boolean()," to the schema above the "count" definition, everything seems to work.