Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ValidationResult

Result generated by schema validation

Hierarchy

  • ValidationResult

Index

Constructors

constructor

  • Creates a new instance of validation ressult and sets its values.

    see

    ValidationResultType

    Parameters

    • Default value path: string = null

      a dot notation path of the validated element.

    • Default value type: ValidationResultType = null

      a type of the validation result: Information, Warning, or Error.

    • Default value code: string = null

      an error code.

    • Default value message: string = null

      a human readable message.

    • Default value expected: any = null

      an value expected by schema validation.

    • Default value actual: any = null

      an actual value found by schema validation.

    Returns ValidationResult

Methods

getActual

  • getActual(): any
  • Gets the actual value found by schema validation.

    Returns any

    the actual value.

getCode

  • getCode(): string
  • Gets the error code.

    Returns string

    the error code

getExpected

  • getExpected(): any
  • Gets the value expected by schema validation.

    Returns any

    the expected value.

getMessage

  • getMessage(): string
  • Gets the human readable message.

    Returns string

    the result message.

getPath

  • getPath(): string
  • Gets dot notation path of the validated element.

    Returns string

    the path of the validated element.

getType

  • Gets the type of the validation result: Information, Warning, or Error.

    see

    ValidationResultType

    Returns ValidationResultType

    the type of the validation result.

toJSON

  • toJSON(): object
  • Returns object

Generated using TypeDoc