Services accessor. Note: Not passed into the constructor because this object should be created before ValidationServices itself. So it gets assigned when the associated service property on ValidationService is assigned the service instance.
Provides access to services.
Protected
loggerProvides an API for logging, sending entries to the loggerService.
Replaces tokens in the message with user friendly values
Rest
...hosts: IMessageTokenSource[]the message with formatting resolved
Protected
finalizeAllows for any additional changes to the replacement for the token. Override to apply custom formatting based on tav.Purpose, such as an HTML span tag with a particular class enclosing the formatted value.
Protected
hasProtected
updateChanges the services on all implementations of IServicesAccessor
Generated using TypeDoc v0.25.12
Replaces all tokens in a message with a user friendly value. Tokens are single words within curley braces like {Label}. They are case insensitive.
Tokens can have an optional second part to identify a formatterKey. The syntax is {token:formatterkey}.
Legal characters in token and formatterkey are letters, digits, and underscore. These are matched case insensitively.
Some values are found in the Validator's ConditionConfig, such as the {Minimum} and {Maximum} of a RangeCondition. They need to be formatted according to the data type, such as "number" will convert 1000 into "1,000" and "date" will convert a javascript Date into "May 20, 2001". This function uses the ValidationServices to handle conversion and localization.
The "formatterkey" in {token:formatterkey} is actually the same as a LookupKey used to identify a data type. Tokens are supplied by implementers of IMessageTokenSource.