class-validator#IsDateString TypeScript Examples

The following examples show how to use class-validator#IsDateString. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: course-update.dto.ts    From edu-server with MIT License 5 votes vote down vote up
/**
   * The start date of the course
   * @example '2020-02-05T06:35:22.000Z'
   */
  @IsDateString()
  @IsOptional()
  readonly start_date: Date;
Example #2
Source File: create-course.dto.ts    From edu-server with MIT License 5 votes vote down vote up
/**
   * The start date of the course
   * @example '2020-02-05T06:35:22.000Z'
   */
  @IsDateString()
  @IsOptional()
  readonly start_date: Date;
Example #3
Source File: create-course.dto.ts    From edu-server with MIT License 5 votes vote down vote up
/**
   * The end date of the course
   * @example '2020-02-05T06:35:22.000Z'
   */
  @IsDateString()
  @IsOptional()
  end_date: Date;
Example #4
Source File: calendar.dto.ts    From life-helper-backend with MIT License 5 votes vote down vote up
@IsOptional()
  @IsDateString()
  startTime?: string
Example #5
Source File: calendar.dto.ts    From life-helper-backend with MIT License 5 votes vote down vote up
@IsOptional()
  @IsDateString()
  dueTime?: string
Example #6
Source File: base.dto.ts    From knests with MIT License 5 votes vote down vote up
@IsNotEmpty()
  @IsDateString()
  createdAt?: string;
Example #7
Source File: base.dto.ts    From knests with MIT License 5 votes vote down vote up
@IsNotEmpty()
  @IsDateString()
  updatedAt?: string;
Example #8
Source File: course-update.dto.ts    From edu-server with MIT License 4 votes vote down vote up
/**
   * The end date of the course
   * @example '2020-02-05T06:35:22.000Z'
   */
  @IsDateString()
  @IsOptional()
  end_date: Date;