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
| Name | Signature | Synopsis |
|---|---|---|
| Operations | ||
| toList | SchemaErrors.toList errors | Returns failures in deterministic path order. |
| count | SchemaErrors.count errors | Returns the number of accumulated failures. |
| isEmpty | SchemaErrors.isEmpty errors | Reports whether the collection contains no failures. |
| toString | SchemaErrors.toString errors | Renders one line per failure. |
| messages | SchemaErrors.messages renderer errors | Renders each failure as a localized predicate, paired with the path it occurred at. |
| fullMessages | SchemaErrors.fullMessages renderer errors | Renders each failure as a complete fragment with its attribute noun, paired with its path. |
| toStringWith | SchemaErrors.toStringWith renderer errors | Renders one localized line per failure. |
Operations
kind:member
kind:member
kind:member
kind:member
kind:member
Renders each failure as a localized predicate, paired with the path it occurred at.
Parameters
| Name | Type | Description |
|---|---|---|
| renderer | Renderer | |
| errors | SchemaErrors |
Returns
(SchemaPath * string) list
Verification Examples
errors |> SchemaErrors.messages (renderer |> Renderer.context "signup")
// [ SchemaPath "name", "must be present" ]kind:member
Renders each failure as a complete fragment with its attribute noun, paired with its path.
Parameters
| Name | Type | Description |
|---|---|---|
| renderer | Renderer | |
| errors | SchemaErrors |
Returns
(SchemaPath * string) list
Verification Examples
errors |> SchemaErrors.fullMessages (renderer |> Renderer.context "signup")
// [ SchemaPath "name", "Name must be present" ]