interface ValidationError
Since 0.1.0

A single validation failure carried by a 422 error.

Mirrors the shape used by @setu-ts/validation-plugin so error payloads are consistent across the validation and exceptions packages.

Properties

readonly
field: string

Dot-path of the offending field (e.g. "address.zip").

readonly
message: string

Human-readable description of the failure.

readonly
optional
code: string

Optional machine-readable failure code.

Usage

import { type ValidationError } from "exceptions/src/index.ts";