Function useValidators

  • useValidators execute an array of Validator decorator metadata on a property of a target instance.

    Type Parameters

    • This

      The type of the class the decorator is applied to.

    • Value

      The type of the decorated property.

    Parameters

    • validators: Validator<This, Value>[]

      An array of validator metadata to apply.

    • value: Value

      The value of the decorated property to validate.

    • targetInstance: This
    • Optionalcursor: Cursor

      The optional cursor, used for providing context in validation errors.

    Returns void