AdvancedModule
PackageReified.Constraint
Building specifications for a catalogue of your own.
Builds a specification, returning the validation failure rather than raising.
Parameters
| Name | Type | Description |
|---|---|---|
| fallback | string | |
| pluralArgument | string option | |
| descriptor | MessageDescriptor |
Returns
Result<MessageFormatSpec, MessageFormatSpecError>
Verification Examples
let descriptor = MessageDescriptor.Advanced.create "constraint.presence.present" Map.empty in MessageFormatSpec.Advanced.tryCreate "must be present" None descriptorBuilds a specification, raising when the plural operand names no argument.
Parameters
| Name | Type | Description |
|---|---|---|
| fallback | string | |
| pluralArgument | string option | |
| descriptor | MessageDescriptor |
Returns
MessageFormatSpec
Verification Examples
let descriptor = MessageDescriptor.Advanced.create "constraint.relation.atLeast" Map.empty in MessageFormatSpec.Advanced.create "must be at least {expected}" None descriptor