-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Is your feature request related to a problem? Please describe.
Currently the error message doesn't specify what value was received, only what was expected
Describe the solution you'd like
An error message similar to
Expected value.name to be a string, but received ${JSON.stringify(value.name)}
instead of
Expected value.name to be a string
Describe alternatives you've considered
Creating my own type with overridden error, but it takes some boilerplate and I think it would be good to have in the main type too.
Also I could just create a try/catch block and append it to the error myself, but then I would not have access to atomic values of the specific check, only to the entire object.
I'm just requesting, maybe it'll be useful as a feature. Or maybe it's too bloated for the scope of this lib.