Documentation / zerotal / index / ValidationError
Class: ValidationError
Defined in: packages/core/src/errors/ValidationError.ts:12
Raised when input validation fails.
Param
errors
Field name → list of messages for that field.
Extends
Constructors
Constructor
new ValidationError(
message,errors):ValidationError
Defined in: packages/core/src/errors/ValidationError.ts:13
Parameters
message
string
errors
Record<string, string[]>
Returns
ValidationError
Overrides
Properties
headers?
optionalheaders?:Record<string,string>
Defined in: packages/core/src/errors/HttpError.ts:15
Inherited from
errors
readonlyerrors:Record<string,string[]>
Defined in: packages/core/src/errors/ValidationError.ts:15
code
readonlycode:string
Defined in: packages/core/src/errors/ZerotalError.ts:18
Inherited from
status
readonlystatus:number=500
Defined in: packages/core/src/errors/ZerotalError.ts:19
Inherited from
context?
readonlyoptionalcontext?:Record<string,unknown>
Defined in: packages/core/src/errors/ZerotalError.ts:20