kir-dev/collage-schedule-planner

Add Class Validation to Event Entity

开放

#18 创建于 2024年5月28日

 (0 条评论) (0 个反应) (1 位负责人)TypeScript (1 个派生)auto 404
backendgood first issue

仓库指标

星标
 (1 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Description: Ensure that the data for the Event entity is validated before it is processed. This involves adding class-validator decorators to the DTOs used for creating and updating events.

Tasks:

  • Create DTOs for creating
  • and updating events.
  • Add appropriate validation decorators to each field in the DTOs. Example: @IsString(), @IsNotEmpty(), @IsDateString(), @IsOptional(), @IsEnum()
  • Update event controller methods to use these DTOs.

Acceptance Criteria:

  • DTOs with validation decorators are created for event creation and update.
  • Event controller methods use these DTOs.
  • Validation errors are properly handled and returned to the client.

贡献者指南