Function validatorDecoratorFactory

  • validatorDecoratorFactory is a utility function used to create Validator type property decorators, used to validate the value of a property.

    Type Parameters

    • This
    • Value

    Parameters

    • name: string

      The name of the 'validator' type decorator.

    • func: ValidatorFunction<This, Value>

      A function that validates the value of the decorated property.

    • Optionalopt: Partial<ValidatorOptions> = ValidatorOptionsDefault

      Optional configuration.

    Returns DecoratorType<This, Value>

    The property decorator function.

    Use this factory function to design custom 'Validator' type decorators tailored to specific data format requirements that are not supported by the library yet.