class-validator-extended - v4.2.0
    Preparing search index...

    Function PastDate

    • Checks if the given value is a Date object in the past.

      Beware that the behaviour of this check depends on the current time and can thus be difficult to test.

      // Ensure the value is in the past.
      @PastDate()
      created: Date

      Parameters

      • Optionaloptions: ValidationOptions

        Generic class-validator options.

      Returns PropertyDecorator