SchemaErrorsType

PackageReified.Schema
Functions for inspecting and rendering accumulated schema failures.

Specification

Kind
Type
Members
7
Examples
0
toListSignature
SchemaErrors.toList errors
countSignature
SchemaErrors.count errors
isEmptySignature
SchemaErrors.isEmpty errors
toStringSignature
SchemaErrors.toString errors
messagesSignature
SchemaErrors.messages renderer errors

Summary

NameSignatureSynopsis
Operations
toListSchemaErrors.toList errorsReturns failures in deterministic path order.
countSchemaErrors.count errorsReturns the number of accumulated failures.
isEmptySchemaErrors.isEmpty errorsReports whether the collection contains no failures.
toStringSchemaErrors.toString errorsRenders one line per failure.
messagesSchemaErrors.messages renderer errorsRenders each failure as a localized predicate, paired with the path it occurred at.
fullMessagesSchemaErrors.fullMessages renderer errorsRenders each failure as a complete fragment with its attribute noun, paired with its path.
toStringWithSchemaErrors.toStringWith renderer errorsRenders one localized line per failure.

Operations

kind:member

toList

SchemaErrors.toList errors
Member
Returns failures in deterministic path order.

Parameters

NameTypeDescription
errorsSchemaErrors

Returns

SchemaIssue list
kind:member

count

SchemaErrors.count errors
Member
Returns the number of accumulated failures.

Parameters

NameTypeDescription
errorsSchemaErrors

Returns

int
kind:member

isEmpty

SchemaErrors.isEmpty errors
Member
Reports whether the collection contains no failures.

Parameters

NameTypeDescription
errorsSchemaErrors

Returns

bool
kind:member

toString

SchemaErrors.toString errors
Member
Renders one line per failure.

Parameters

NameTypeDescription
errorsSchemaErrors

Returns

string
kind:member

messages

SchemaErrors.messages renderer errors
Member
Renders each failure as a localized predicate, paired with the path it occurred at.

Parameters

NameTypeDescription
rendererRenderer
errorsSchemaErrors

Returns

(SchemaPath * string) list

Verification Examples

errors |> SchemaErrors.messages (renderer |> Renderer.context "signup")
 // [ SchemaPath "name", "must be present" ]
kind:member

fullMessages

SchemaErrors.fullMessages renderer errors
Member
Renders each failure as a complete fragment with its attribute noun, paired with its path.

Parameters

NameTypeDescription
rendererRenderer
errorsSchemaErrors

Returns

(SchemaPath * string) list

Verification Examples

errors |> SchemaErrors.fullMessages (renderer |> Renderer.context "signup")
 // [ SchemaPath "name", "Name must be present" ]
kind:member

toStringWith

SchemaErrors.toStringWith renderer errors
Member
Renders one localized line per failure.

Parameters

NameTypeDescription
rendererRenderer
errorsSchemaErrors

Returns

string

Verification Examples

errors |> SchemaErrors.toStringWith (renderer |> Renderer.context "signup")