• Checks if the given value is a valid Dayjs object.

    Note that dayjs is not a constructor, so you can't simply use @IsInstance(dayjs).

    // Ensure the value is a Dayjs object.
    @IsDayjs()
    dateOfBirth: Dayjs

    Parameters

    • Optionaloptions: {
          allow_invalid?: 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()).

    Returns PropertyDecorator