Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ValidationError

Constructs a new ValidationError

method

ValidationError

param

The Validator used to create this error, if any.

param

The Context object used in conjunction with the Validator to create this error.

param

The actual error message

param

An optional key used to define a key for this error. One will be created automatically if not provided here.

Hierarchy

  • ValidationError

Index

Constructors

constructor

Properties

context

context: any

errorMessage

errorMessage: string

isServerError

isServerError: boolean

key

key: string

property

property: any

propertyName

propertyName: string

Optional validator

validator: Validator

Methods

Static getKey

  • getKey(validatorOrErrorName: Validator | string, propertyName?: string): string
  • Composes a ValidationError 'key' given a validator or an errorName and an optional propertyName

    method

    getKey

    static

    Parameters

    • validatorOrErrorName: Validator | string
    • Optional propertyName: string

    Returns string

    A ValidationError 'key'

Generated using TypeDoc