Cotal TypeScript packages
    Preparing search index...

    Function schemaErrorLocation

    • Where a closed-schema validator stopped, from its last error, as at <field path> and what is wrong there. Each segment is printed only when it is a plain identifier or an index, so an arbitrary user-controlled property name never reaches a message. name gives how the first segment reads, such as the flag a preset option takes. Empty when it cannot say.

      Parameters

      • errors:
            | readonly {
                instancePath: string;
                keyword: string;
                params: Record<string, unknown>;
            }[]
            | null
            | undefined
      • name: (field: string) => string = ...

      Returns string