You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to reproduce
Copy and paste the code above. Run the project and click on button Submit.
Actual Result
Error is not displayed
Expected Result
The error is displayed under Select: "items field must have at least 1 items"
Description
Form.Item doesn't show the error, because it sets "touched" to false. It handles "touched" incorrectly when it is an empty array.
I researched this problem and understood why this is happening:
If the touched field is an empty array, it means that the field is touched. jaredpalmer/formik#3344 (comment)
The Problem
The following code incorrectly handles an empty touched array -> Form.Item: 28. If a touched array is empty, then it sets isTouched to false.
Thanks for the answers and help!
The text was updated successfully, but these errors were encountered:
Hello everyone! ✋
I'm using
validationSchema
forFormik
component and usingForm.Item
to display validation errors.Code:
How to reproduce
Copy and paste the code above. Run the project and click on button
Submit
.Actual Result
Error is not displayed
Expected Result
The error is displayed under
Select
: "items field must have at least 1 items"Description
Form.Item doesn't show the error, because it sets "touched" to false. It handles "touched" incorrectly when it is an empty array.
I researched this problem and understood why this is happening:
If the touched field is an empty array, it means that the field is touched. jaredpalmer/formik#3344 (comment)
The Problem
The following code incorrectly handles an empty touched array -> Form.Item: 28. If a touched array is empty, then it sets
isTouched
tofalse
.Thanks for the answers and help!
The text was updated successfully, but these errors were encountered: