Skip to content

Commit 682e2c4

Browse files
committed
✨ feat: (BE) - feedback request dto에 custom type validation 추가
1 parent 684396c commit 682e2c4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

backend/rest/src/interview/dto/feedback.dto.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { ApiProperty } from '@nestjs/swagger';
2-
import { IsNotEmpty, IsNumber, IsString } from 'class-validator';
2+
import { Type } from 'class-transformer';
3+
import { IsNotEmpty, IsNumber, IsString, ValidateNested } from 'class-validator';
34

45
export class FeedbackRequestDto {
56
@IsString()
@@ -11,6 +12,8 @@ export class FeedbackRequestDto {
1112
docsUUID: string;
1213

1314
@IsNotEmpty()
15+
@ValidateNested({ each: true })
16+
@Type(() => FeedbackBoxDto)
1417
@ApiProperty({
1518
example: '{ startTime: 0, innerIndex: 0, content: "목소리에서 울림이 느껴지네요." }',
1619
description: 'feedbackbox (startTime, innerIndex, content)',

0 commit comments

Comments
 (0)