Closed Daniel-Vinicius closed 3 years ago
The error hasn't changed it's just showing you the message when you log it. If you inspect the error you'll see it's an object with all those properties
how do i inspect the error?
i'm not sure what you mean, use the error how you want it is an object.
OK so nothing has changed the error is still an object? If so my problem was solved!
Ya, nothing has changed
Hello Good afternoon, I am developing a ReactJS project in an online course. And the teacher uses Yup, when an error occurs, Yup returns an Object, this in your version:
^0.28.3
.With the version
"yup": "^ 0.32.8"
, Yup returns me something like this:I want to force Yup to return an Object like this to me:
What should I do?
The Project in question is this
I'm using Typescript. The file that uses Yup is this
Yup Code
Code Sandbox here
In the Code Sandbox Above Yup is in its outdated test version and see.