ConditionConfig for GreaterThanOrEqualCondition

interface GreaterThanOrEqualConditionConfig {
    secondConversionLookupKey?: null | string;
    valueHostName: null | string;
    secondValueHostName: null | string;
    conditionType: string;
    category?: ConditionCategory;
    conversionLookupKey?: null | string;
}

Hierarchy (view full)

Properties

secondConversionLookupKey?: null | string

Associated with secondValueHostName only. Assign to a LookupKey that is associated with a DataTypeConverter. Use it to convert the value prior to comparing, to handle special cases like case insensitive matching ("CaseInsensitive"), rounding a number to an integer ("Round"), just the Day or Month or any other number in a Date object ("Day", "Month").

valueHostName: null | string

One source for the value to evaluate. By design, Condition.evaluate() takes a valueHost object, allowing the caller to simply pass in the value. Leave this null to use that valueHost object.

Assign this to a ValueHostName if you want to have it looked up in the ValueHostsManager.getValueHost().

Typically leave Validator.ConditionConfig.valueHostName null because Condition.evaluate() is passed the correct valueHost. However, Validator.EnablerConfig needs it assigned. Same with any Condition that is a child of another, like in ConditionWithChildrenBase.

Many conditions need two or more sources for values. They are expected to create more ValueHostName properties in their ConditionConfig, where the remaining Properties are identified.

secondValueHostName: null | string

ValueHostName to retrieve a ValueHost that will be the source of another value for the evaluate() method.

conditionType: string

Identifies the class for ConditionFactory to create. It is also used as the Validator's errorCode when ValidatorConfig.errorCode was not assigned.

Most Condition classes have an official value for Category. This allows you to override that official value in special situations and supply a value when the Condition does not.

conversionLookupKey?: null | string

Assign to a LookupKey of the data type you want the current value to be converted to before comparing. Examples:

  • case insensitive matching, use LookupKey.CaseInsensitive,
  • rounding a number to an integer, use LookupKey.Integer,
  • just the Day or Month or any other number in a Date object, use LookupKey.Day, LookupKey.Month, LookupKey.Year, etc.
  • a calculated value derived from the value, like the total days represented by a Date object, use LookupKey.TotalDays.

Generated using TypeDoc v0.25.12