createIssue

View Source

Summary

Creates a Standard Schema issue object.

Signature

function createIssue(
  message: string,
  path: readonly (PropertyKey | PathSegment)[] | undefined,
): Issue;

Params

message

Human-readable validation message.

path

Optional issue path within the input value.

Returns

A Standard Schema issue.