Options
All
  • Public
  • Public/Protected
  • All
Menu

A class responsible for recording information about a validation failure.

Hierarchy

  • DataModelValidationFailure

Index

Constructors

Properties

invalidValue: any
fallback: any
dropped: boolean
message: string
unresolved: boolean
fields: any = {}

If this field contains other fields that are validated as part of its validation, their results are recorded here.

elements: ElementValidationFailure[] = []

If this field contains a list of elements that are validated as part of its validation, their results are recorded here.

Methods

  • isEmpty(): boolean
  • Whether this failure contains other sub-failures.

    Returns boolean

  • toObject(): { invalidValue: any; fallback: any; dropped: boolean; message: string }
  • Return the base properties of this failure, omitting any nested failures.

    Returns { invalidValue: any; fallback: any; dropped: boolean; message: string }

    • invalidValue: any
    • fallback: any
    • dropped: boolean
    • message: string
  • toString(): string
  • Represent the DataModelValidationFailure as a string.

    Returns string

  • Format a DataModelValidationFailure instance as a string message.

    Parameters

    Returns string

    The formatted failure string