Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ValidationError

The structure of a validation error.

Path defines the shallow or deep path (using dots). Message is an arbitrary message in english.

Hierarchy

  • ValidationError

Index

Constructors

Properties

Methods

Constructors

constructor

  • new ValidationError(path: string, code: string, message: string): ValidationError
  • Parameters

    • path: string
    • code: string
    • message: string

    Returns ValidationError

Properties

code

code: string

A lower cased error code that can be used to identify this error and translate.

message

message: string

Free text of the error.

path

path: string

The path to the property. May be a deep path separated by dot.

Methods

Static createInvalidType

  • createInvalidType(path: string, expectedType: string, actual: any): ValidationError
  • Parameters

    • path: string
    • expectedType: string
    • actual: any

    Returns ValidationError

Generated using TypeDoc