SchemaMessagesModule

PackageReified.Schema

SchemaMessages

SchemaMessages is Reified.Schema's own message catalogue for parse, boundary-supply, and structural failures. These keys stay in the Schema package; Schema depends on Constraint and never the reverse. Constraint failures use the constraint.* catalogue (Catalogue.keys); Schema's own failures use these keys. Both render through the same mechanics.

Key Arguments Default English
schema.omitted n/a must be supplied
schema.blank n/a must be present
schema.expectedScalar n/a must be a single value
schema.expectedObject n/a must be an object
schema.expectedMany n/a must be a collection
schema.invalidFormat expected must be a valid
schema.parseOutOfRange target must be within the range of
schema.unknownTag choices must be one of

SchemaMessages.keys, .arguments, and .english expose the same data at runtime. Constructor failures and custom errors carrying authored prose have no catalogue entry: Schema does not invent a key for text your application wrote.

At SchemaPath.root, full rendering uses constraint.attribute.default, "value" in English, never the document context.

See Redisplay And Field Errors for how these keys render in a form loop.

Summary

NameSignatureSynopsis
Operations
keysSchemaMessages.keys Every Schema message key, with the arguments its template may interpolate.
argumentsSchemaMessages.arguments The argument names each Schema entry interpolates.
englishSchemaMessages.english The neutral English template for each Schema entry.

Operations

kind:member

keys

SchemaMessages.keys
Member
Every Schema message key, with the arguments its template may interpolate.

Returns

string list

Verification Examples

SchemaMessages.keys |> List.filter (translations.ContainsKey >> not)
kind:member

arguments

SchemaMessages.arguments
Member
The argument names each Schema entry interpolates.

Returns

Map<string, string list>

Verification Examples

SchemaMessages.arguments.["schema.invalidFormat"] // [ "expected" ]
kind:member

english

SchemaMessages.english
Member
The neutral English template for each Schema entry.

Returns

Map<string, string>

Verification Examples

SchemaMessages.english.["schema.omitted"] // "must be supplied"