Overview

The `ValidationError` object

ValidationError {}

The ValidationError object is an extension of the CommonError class and is thrown when an operation could not be performed despite proper type(but not exclusively) with the message built from the described problem and its solution, along with additional identification on the given or stored template.

Accessors

public get name(): string The get accessor obtains error name of a string type, set to 'ValidationError' that is being thrown.

public get [Symbol.toStringTag](): string The get accessor, with the help of toStringTag, changes the default tag to 'ValidationError' for an instance of ValidationError.

Methods

public static define(): ValidationError<Id> Defines the ValidationError instance with the message built of the given required problem, fix and optional id on the supplied or stored template.

public static isValidationError(): value is ValidationError<Id> Checks whether the value of any type is the ValidationError instance of any or the given identification.

Last updated