• Checks if the given value is a valid Dayjs object not earlier than minimum.

    // Ensure the value is after the infamous Y2K.
    @MinDayjs('2000-01-01Z', { granularity: 'day', inclusive: true })
    y2kUnsafeDate: Dayjs

    Parameters

    • minimum:
          | undefined
          | null
          | string
          | number
          | Date
          | Dayjs

      The minimum allowed value.

    • Optionaloptions: {
          allow_invalid?: boolean;
          granularity?: OpUnitType;
          inclusive?: boolean;
      } & ValidationOptions

      Accepts the following options (in addition to generic class-validator options):

      • allow_invalid: boolean = false If true, allow the Dayjs object to be invalid (see isValid()).
      • inclusive: boolean = false If true, allow the maximum date as well.
      • granularity: string = 'milliseconds' Defines the granularity, e.g. "day" to ignore hours, minutes, seconds and milliseconds.

    Returns PropertyDecorator