Interface IMessageTokenSource

Allows a class of the Validator & Condition classes to return tokens and associated values that can appear in an error message.

interface IMessageTokenSource {
    getValuesForTokens(valueHost, valueHostResolver): TokenLabelAndValue[];
}

Hierarchy (view full)

Implemented by

Methods

  • Returns an array of 0 or more tokens supported by this MessageTokenSource. Each returned has the token supported (omitting {} so {Label} is "Label") and the value in its native data type (such as Date, number, or string). Caller will search the message for each token supplied. If found, it converts the value to a string using localization rules and replaces the token. The TokenLabel doesn't provide {} because we may support additional attributes within the token, like {Value:AbbrevDateFormat}

    Parameters

    Returns TokenLabelAndValue[]

Generated using TypeDoc v0.25.12