Optional
errorsIf the validated value is an union (either
), this property contains errors for each of the
union members.
A human-readable message for the error.
The name of the error.
Optional
pathIf the validated value is a construct, like an array or an object, this property contains the path to follow to find the incriminated value that is causing the validation to fail.
The
ParseError
type is the error object returned by the validation functions. It contains the name of the error, a message, and optionally the path to the error in the parsed object. Additionally, it can contain a sub-errors
array that lists the different failure cases of theeither
schema.