Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ValidationError

Validation Error. Thrown when the sequelize validation has failed. The error contains an errors property, which is an array with 1 or more ValidationErrorItems, one for each validation that failed.

param message

Error message

param errors

Array of ValidationErrorItem objects describing the validation errors

Hierarchy

Index

Constructors

Properties

cause: undefined | Error

Array of ValidationErrorItem objects describing the validation errors

message: string
name: string
stack?: string
prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

Type declaration

stackTraceLimit: number

Accessors

  • get original(): this["cause"]
  • Returns this["cause"]

  • get parent(): this["cause"]
  • Returns this["cause"]

Methods

  • Gets all validation error items for the path / field specified.

    Parameters

    • path: string

      The path to be checked for error items

    Returns ValidationErrorItem[]

    Validation error items for the specified path

  • captureStackTrace(targetObject: object, constructorOpt?: Function): void
  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc