Used by ValidationManager.startModifying() function to modify the ValidationManagerConfig.valueHostConfigs array. It does not change the original until you call its apply() function. It makes changes through ValidationManager.addOrMergeValueHost().

Hierarchy (view full)

Implements

Constructors

Accessors

  • get baseConfig(): T
  • The initial setup from the constructor and assigned ValueHostConfigs until an OverrideConfig is added. It always retains the official services and callbacks. Merging overrides updates this object.

    Returns T

Methods

  • If it finds the validator with the errorcode specified, it will combine the condition with the existing condition using a rule supplied or callback to let you create a conditionConfig. If it the validator is not found, it will throw an error and log. If the ValueHost is on an earlier override or baseConfig, a new entry is made in the current override, reflecting the same data as earlier, but now with a modified validator. If the ValueHost is on the current override, the existing entry is modified.

    The resulting ValidatorConfig's errorCode will not have changed from the original to ensure it aligns with everything depending on the original error code.

    Parameters

    • valueHostName: string
    • errorCode: string
    • builderFn: ((combiningBuilder, existingConditionConfig) => void)

      A function to create a conditionConfig that will replace the existing. You are passed a Builder object, where you can build your new conditions, and the existing conditionConfig, which can be added to a Builder object with the conditionConfig() function.

      modifier.combineWithRule('Field1', 'NotNull', 
      (combiningBuilder, existingConditionConfig)=> {
      combiningBuilder.when(
      (enablerBuilder)=> enablerBuilder.equalToValue('YES', 'Field2'),
      (childBuilder)=> childBuilder.conditionConfig(existingConditionConfig));
      });

    Returns ValidationManagerConfigModifier

  • Uses the combineUsing parameter to determine how to combine the conditions.

    Parameters

    • valueHostName: string
    • errorCode: string
    • combineUsing: CombineUsingCondition
    • builderFn: ((combiningBuilder) => void)

      A function to create the condition that you want to combine with the existing condition.

      modifier.combineWithRule('Field1', 'NotNull', CombineUsingCondition.When, 
      (combiningBuilder)=> combiningBuilder.equalToValue('YES', 'Field2'));

    Returns ValidationManagerConfigModifier

  • Replace the condition supplying the replacement conditionConfig directly. If it finds the validator with the errorcode specified, it will replace the condition with the existing condition. If not, it logs and throws an error. If the ValueHost is on an earlier override or baseConfig, a new entry is made in the current override, reflecting the same data as earlier, but now with a modified validator. If the ValueHost is on the current override, the existing entry is modified.

    The resulting ValidatorConfig's errorCode will not have changed from the original to ensure it aligns with everything depending on the original error code.

    Parameters

    • valueHostName: string
    • errorCode: string
    • conditionConfig: ConditionConfig

      provide a complete ConditionConfig as the replacement

    Returns ValidationManagerConfigModifier

  • Replace supplying the replacement condition through a Builder object.

    Parameters

    • valueHostName: string
    • errorCode: string
    • builderFn: ((replacementBuilder) => void)

      Use a function to create a conditionConfig that will replace the existing. You are passed the builder, where you can build your new conditions.

    Returns ValidationManagerConfigModifier

  • Combines a condition with a ValidatorConfig's condition using a rule supplied or callback to let you create a conditionConfig.

    The resulting ValidatorConfig's errorCode will not have changed from the original to ensure it aligns with everything depending on the original error code.

    Parameters

    • destinationOfCondition: ValidatorConfig

      the conditionConfig that you want to combine with the new condition.

    • arg2: CombineUsingCondition | ((combiningBuilder, existingConditionConfig) => void)

      Either of these:

      • Use a function to create a conditionConfig that will replace the existing. You are passed the Builder object, where you can build your new conditions, and the existing conditionConfig, which can be added to a Builder object with the conditionConfig() function.
      • a CombineUsingCondition enum value that specifies how to combine the conditions.
    • Optional arg3: ((combiningBuilder) => void)

      create the condition that you want to combine with the existing condition.

    Returns void

  • Updates the conditionConfig property of destinationOfCondition where the replacement is either a conditionConfig or using a Builder object.

    If it finds the validator with the errorcode specified, it will replace the condition with the existing condition. If not, it logs and throws an error. If the ValueHost is on an earlier override or baseConfig, a new entry is made in the current override, reflecting the same data as earlier, but now with a modified validator. If the ValueHost is on the current override, the existing entry is modified.

    The resulting ValidatorConfig's errorCode will not have changed from the original to ensure it aligns with everything depending on the original error code.

    Parameters

    • destinationOfCondition: ValidatorConfig
    • sourceOfConditionConfig: ConditionConfig | ((replacementBuilder) => void)

      Either of these:

      • use a function to create a conditionConfig that will replace the existing. You are passed the builder, where you can build your new conditions.
      • provide a complete ConditionConfig as the replacement

    Returns void

Generated using TypeDoc v0.25.12