Interface IFluentValidatorBuilder

Use this when using alternative conditions, as you will need to provide substitutes for each fluent function. Your class should be registered with FluentFactory.

interface IFluentValidatorBuilder {
    parentConfig: InputValueHostConfig;
    add(conditionType, conditionConfig, errorMessage, validatorConfig): void;
}

Implemented by

Properties

Methods

Properties

parentConfig: InputValueHostConfig

The InputValueHostConfig that is being constructed and will be supplied to ValidationManagerConfig.valueHostConfigs.

Methods

  • For any implementation of a fluent function that works with FluentValidatorBuilder. It takes the parameters passed into that function (conditionConfig and validatorconfig) and assemble the final ValidatorConfig, which it adds to the InputValueHostConfig.

    Parameters

    • conditionType: null | string

      When not null, this will be assigned to conditionConfig for you.

    • conditionConfig: null | Partial<ConditionConfig>

      if null, expects validatorConfig to supply either conditionConfig or conditionCreator. If your fluent function supplies stand-alone parameters that belong in conditionConfig, assign them to conditionConfig.

    • errorMessage: undefined | null | string

      optional error message. Will overwrite any from validatorConfig if supplied.

    • validatorConfig: undefined | null | FluentValidatorConfig

      does not expect conditionConfig to be setup, but if it is, it will be replaced when conditionConfig is not null.

    Returns void

Generated using TypeDoc v0.25.12