When true, data type check conditions are auto generated if not supplied in the ValueHost's list of validators. Defaults to true.
When true, data type check conditions are auto generated if not supplied in the ValueHost's list of validators. Defaults to true.
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.
Works together with IDataTypeCheckGenerator to attempt to supply one or more Conditions suitable for the given data type lookup key that is used as a Data Type Check against the native value.
By default, automatic generation uses the DataTypeCheckCondition. If you implement an IDataTypeCheckGenerator class, you may return multiple conditions. In that case, return a DataTypeCheckCondition too if it is needed.
That condition determines an error when InputValueHost.getValue() returns undefined, which is a result of a conversion of InputValue fails.
There are other ways to check a data type. Strings with a well defined pattern will often be the same as they were between Input Value and Native Value, aside from trimming spaces. So the NativeValue is a string that will need to be checked against a regular expression or some other rule that confirms the string matches requirements.
Thats when you create a IDataTypeCheckGenerator class and register it with autoGenerateDataTypeCheckService.
The list of Conditions generated by a matching IDataTypeCheckGenerator, or a DataTypeCheckCondition if no IDataTypeCheckGenerator was found. If DataTypeCheckGenerator returns an empty array, it means do not generate the DataTypeCheckCondition and this function returns the empty array itself.
Protected
createFinds the first IDataTypeCheckGenerator that supports the value, or null if none are found. Runs the lazyloader if setup and the first search fails.
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 that supports automatic generation of Conditions for the Data Type Check using IDataTypeCheckGenerator instances.
This class is available on ValidationServices.autoGenerateDataTypeCheckService. This feature is specific to InputValueHosts as it utilizes both the Input Value and Native Value.