If validation succeeds, it returns ok: true and optionally includes
additional context.
If it fails, it returns ok: false along with an error code and payload as
defined in ErrorMap.
Type Parameters
OutputContextextendsvoid|object
Additional context injected into execution on
success.
ErrorMapextendsvoid|object
A map where each key is an error code, and the
corresponding value is the payload associated with that specific error.
Represents the result of a validation step.
If validation succeeds, it returns
ok: true
and optionally includes additional context. If it fails, it returnsok: false
along with an error code and payload as defined inErrorMap
.