Skip to main content

ValidationError

Hierarchy

Index

Constructors

constructor

  • new ValidationError(message: string | Error[], path?: string, value?: unknown): ValidationError

Properties

errors

errors: ValidationError[] = []

List of invalidations for the field.

hasOriginalMessage

hasOriginalMessage: boolean = false

Whether an original message was provided through the constructor.

hasPathPrefix

hasPathPrefix: boolean = false

Whether a “Invalid path” message was prepended to the original message.

path

path: string

Object path for the invalid field.

value

value: unknown

Field value at time of failure.

Methods

addErrors