Skip to content

ValidationError

Defined in: error.ts:21

Represents a validation error for a specific key path

  • Error

new ValidationError(args): ValidationError

Defined in: error.ts:38

Create a validation error

KeyPath

Path to the invalid field

string | Error

Error message or Error object

ValidationError

An Error reason becomes the cause, and its message at that moment becomes the error's message. An error from another realm is recognized by its shape rather than by instanceof, so a cause is not necessarily an instance of Error.

Error.constructor

readonly optional cause?: Error

Defined in: error.ts:25

Error.cause


readonly key: KeyPath

Defined in: error.ts:22


readonly keyPath: KeyPath

Defined in: error.ts:23


readonly message: string

Defined in: error.ts:24

Error.message