• 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).

    Example

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

    Parameters

    • Optional options: {
          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