Constructor
Sets up a function to lazy load the configuration when any of the other functions are called.
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.
Protected
indexUtility for register() to identify an already registered item that can be replaced by the supplied item.
an index into the getAll collection of a match or -1 if no match.
Converts the native value to a string that can be shown to the user. Result includes the successfully converted value or validation error information.
Formatting uses localization. It uses IDataTypeFormatter classes, which may handle multiple cultures. When searching for a formatter, it tries the ValidationServices.activeCultureID first and if no formatter is supplied for that culture, it has a chain of fallback cultures that you supply in the constructor.
Optional
lookupKey: null | stringIf not supplied, a lookup key is created based on the native value type. If you need alternative formatting or are supporting a user defined type, always pass in the associated lookup key. They can be found in the LookupKeys module.
successfully converted value or validation error information.
Protected
formatRemoves the first IDataTypeFormatter that supports both parameters.
Finds the IDataTypeFormatter associated with the lookup key and this class's own CultureID. Runs the lazyloader if setup and the first search fails.
A matching IDataTypeFormatter or null if none match.
Protected
updateChanges the services on all implementations of IServicesAccessor
Registers an instance of the interface supported by this service. It may replace an existing one, as determined by the subclass. Replace supported on: IDataTypeIdentifier
Protected
unregisterReturns the full collection.
Protected
ensureProtected
logProtected
hasGenerated using TypeDoc v0.25.12
A service for formatting data types used within tokens of error messages using IDataTypeFormatter instances.
Formatting uses localization. It uses IDataTypeFormatter classes, which may handle multiple cultures. When searching for a formatter, it tries the CultureService.activeCultureID first and if no formatter is supplied for that culture, it has a chain of fallback cultures that you supply in the constructor.
This class is available on ValidationServices.dataTypeFormatterService.