Constructor
Formatter lookup key must match this value
Optional
trueLabel: stringtext for 'true'
Optional
falseLabel: stringtext for 'false'
Optional
trueLabell10n: stringlocalization key for trueLabel
Optional
falseLabell10n: stringlocalization key for falseLabel
Services accessor. Note: Not passed into the constructor because this object should be created before ValidationServices itself. So it gets assigned when ValidationService.dataTypeFormatterService is assigned a value.
Provides access to services.
Protected
hasProtected
expectedThe DataTypeLookup key(s) that this class supports.
Text shown the user for a value of true. To provide localization of "true" and "false", set up ValidationServices.TextLocalizerService with text keys, cultures and translations. Then provide values for TrueLabel and FalseLabel when registering this class in the dataTypeFormatterService.
Localization key for TrueLabel. Its value will be matched to an entry made to ValidationServices.TextLocalizerService, specific to the active culture. If setup and no entry was found in TextLocalizerService, the value from the TrueLabel property is used.
Text shown the user for a value of false To provide localization of "true" and "false", set up ValidationServices.TextLocalizerService with text keys, cultures and translations. Then provide values for TrueLabel and FalseLabel when registering this class in the dataTypeFormatterService.
Localization key for FalseLabel. Its value will be matched to an entry made to ValidationServices.TextLocalizerService, specific to the active culture. If setup and no entry was found in TextLocalizerService, the value from the FalseLabel property is used.
Evaluates the parameters to determine if its format() method should handle the value with those same parameters. It should always match the DataTypeLookupKey. It does not have to evaluate the cultureID, as there are implementations where the format() function handles eve
Such as 'en-US' and 'en'
Use its format() method when true. Do not use format() when false.
Protected
prepProtected
matchingCreates a formatted string for the value, applying the goals of the DataTypeLookupKey and making it culture specific.
Protected
formatProtected
supportsProtected
getGenerated using TypeDoc v0.25.12
Supports LookupKey.Boolean, and provides 'true' and 'false' labels for all cultures unless you provide alternatives into the constructor or setup localization with the TextLocalizerService. It defaults to 'TRUE' as the localization key for true and 'FALSE' as the localization key for false. LookupKey: "Boolean" or whatever the user supplies.