Back to Sequelize

ValidationError

static/v4/class/lib/errors/index.js~ValidationError.html

latest1.7 KB
Original Source

publicclass| source

ValidationError

Extends:

Error → BaseError → ValidationError

Direct Subclass:

UniqueConstraintError

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.

Member Summary

| Public Members | | public |

errors: ValidationErrorItem[]

| |

Method Summary

| Public Methods | | public |

get(path: string): ValidationErrorItem[]

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

| |

Public Members

publicerrors: ValidationErrorItem[] source

Public Methods

publicget(path: string): ValidationErrorItem[] source

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

Params:

| Name | Type | Attribute | Description | | path | string | |

The path to be checked for error items

|

Return:

| ValidationErrorItem[] |

Validation error items for the specified path

|