Options
All
  • Public
  • Public/Protected
  • All
Menu

Validation error container holding all validation errors.

Hierarchy

  • ObjectErrors

Index

Constructors

constructor

Properties

cache

cache: Map<string, ValidationError[]> = ...

The property name index for all of the ValidationError instances.

errors

errors: ValidationError[] = []

The array of ValidationError instances.

Accessors

valid

  • get valid(): boolean
  • If valid is true, there are no errors and the errors array will be empty.

    Returns boolean

Methods

addValidationError

getErrors

  • Get the ValidationError instances for the key (See {@link getObjectPropertyKey}) parameter .

    Parameters

    • key: string

      The {@link getObjectPropertyKey} key.

    Returns ValidationError[]

    Array The array of validation errors

getPropertiesWithErrors

  • getPropertiesWithErrors(): string[]
  • Get the properties that have errors.

    Returns string[]

    Array of properties that are invalid.

Private push

  • If the context array is absent it is created, otherwise the context is placed at the end of the existing context array.

    Parameters

    • key: string

      The signature used to lookup the array of ValidationError instances.

    • error: ValidationError

      The ValidationError instance

    Returns void

Generated using TypeDoc