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

Error message

Param

Array of ValidationErrorItem objects describing the validation errors

Hierarchy

Constructors

Properties

cause?: 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.

    Returns

    Validation error items for the specified path

    Parameters

    • path: string

      The path to be checked for error items

    Returns ValidationErrorItem[]

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc