@morojs/moro


@morojs/moro / handleValidationError

Function: handleValidationError()

handleValidationError(errors, field, req, res, customHandler?, globalHandler?): void

Defined in: src/core/validation/error-handler.ts:35

Handle validation errors using the configured error handler This is the central function that all validation error handling should go through

Parameters

errors

ValidationErrorDetailType[]

field

"params" | "query" | "body" | "headers"

req

HttpRequest

res

HttpResponse

customHandler?

ValidationErrorHandler

globalHandler?

ValidationErrorHandler

Returns

void