跳到主要内容

ui/build/form/standard\_schema\_form\_errors

ui/build/form/standard_schema_form_errors

Type Aliases

StandardSchemaIssue

type StandardSchemaIssue = Extract<Awaited<ReturnType<ReturnType<typeof Schema.toStandardSchemaV1>["~standard"]["validate"]>>, {
  issues: readonly unknown[];
}>["issues"][number];

Defined in: apps/website/.api-docs-entry/ui/build/form/standard_schema_form_errors.d.ts:9

One issue in a standard-schema validation failure, derived from effect's own adapter.

Schema.toStandardSchemaV1 is effect's implementation of the standard schema interface, so its failure result is the authoritative shape of an issue here — derived through ReturnType rather than restated from the spec, which keeps the two in step by construction.


StandardSchemaOf

type StandardSchemaOf<S> = ReturnType<typeof Schema.toStandardSchemaV1>;

Defined in: apps/website/.api-docs-entry/ui/build/form/standard_schema_form_errors.d.ts:13

Any schema the realm's forms accept: an Effect schema, standard-adapted or raw.

Type Parameters

Type Parameter
S extends Schema.Codec<unknown, unknown>

Functions

fieldAndFormErrorsFromStandardIssues()

function fieldAndFormErrorsFromStandardIssues(issues): FieldAndFormErrors;

Defined in: apps/website/.api-docs-entry/ui/build/form/standard_schema_form_errors.d.ts:19

Parameters

Parameter Type
issues readonly Issue[]

Returns

FieldAndFormErrors