Back to Sequelize

ValidationErrorItem

static/v5/class/lib/errors/validation-error.js~ValidationErrorItem.html

latest7.6 KB
Original Source

publicclass| source

ValidationErrorItem

Validation Error Item Instances of this class are included in the ValidationError.errors property.

Constructor Summary

| Public Constructor | | public |

constructor(message: string, type: string, path: string, value: string, inst: Object, validatorKey: Object, fnName: string, fnArgs: string)

Creates new validation error item

| |

Member Summary

| Public Members | | public |

instance: Model

The DAO instance that caused the validation error

| | | public |

message: string

An error message

| | | public |

path: string

The field that triggered the validation error

| | | public |

type: string

The type/origin of the validation error

| | | public |

validatorArgs: string

Parameters used with the BUILT-IN validator function, if applicable

| | | public |

validatorKey: string

A validation "key", used for identification

| | | public |

validatorName: string

Property name of the BUILT-IN validator function that caused the validation error (e.g.

| | | public |

value: string

The value that generated the error

| |

Public Constructors

publicconstructor(message: string, type: string, path: string, value: string, inst: Object, validatorKey: Object, fnName: string, fnArgs: string) source

Creates new validation error item

Params:

| Name | Type | Attribute | Description | | message | string | |

An error message

| | type | string | |

The type/origin of the validation error

| | path | string | |

The field that triggered the validation error

| | value | string | |

The value that generated the error

| | inst | Object |

  • optional

|

the DAO instance that caused the validation error

| | validatorKey | Object |

  • optional

|

a validation "key", used for identification

| | fnName | string |

  • optional

|

property name of the BUILT-IN validator function that caused the validation error (e.g. "in" or "len"), if applicable

| | fnArgs | string |

  • optional

|

parameters used with the BUILT-IN validator function, if applicable

|

Public Members

publicinstance: Model source

The DAO instance that caused the validation error

publicmessage: string source

An error message

publicpath: string source

The field that triggered the validation error

publictype: string source

The type/origin of the validation error

publicvalidatorArgs: string source

Parameters used with the BUILT-IN validator function, if applicable

publicvalidatorKey: string source

A validation "key", used for identification

publicvalidatorName: string source

Property name of the BUILT-IN validator function that caused the validation error (e.g. "in" or "len"), if applicable

publicvalue: string source

The value that generated the error