OptionalfieldOptionalonWhat to do on validation failure:
'reject' (default) — return { ok: false, error: BusError(VC_VALIDATION_FAILED) }
without invoking the handler'warn' — console.warn and continue to the handler with the
original (un-coerced) commandEven in 'warn' mode, the schema's .parse() coercions are NOT
applied — the original command flows through unchanged. To use
coerced values, use 'reject' mode and validate before dispatching.
Which field on the Command to validate. Default:
'target'.'target'— validatecmd.target'payload'— validatecmd.payload'both'— validate{ target, payload }as a single object(cmd) => unknown— extract a custom value fromcmd