ErrorPath: {
    index?: number;
    key?: string;
    path?: ErrorPath;
}

The path to the failure case in the parsed object. Recursively follow the path property to find the failed value after a validation.

Type declaration

  • Optional index?: number

    The index of the failed value, if the current parsed data is an array.

  • Optional key?: string

    The key of the failed value, if the current parsed data is an object.

  • Optional path?: ErrorPath

    If the value is a construct, like an array or an object, this value contains the next step to retrieve the failed value.