Skip to content

Commit

Permalink
fix: createPostDto arrayNotEmpty
Browse files Browse the repository at this point in the history
  • Loading branch information
GanghyeonSeo committed Jun 7, 2024
1 parent d65a1fe commit 9e74a33
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/post/dto/req/CreatePost.dto.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsString, MaxLength } from 'class-validator';
import {
IsNotEmpty,
IsString,
MaxLength,
ArrayNotEmpty,
} from 'class-validator';

export class CreatePostDto {
@ApiProperty({
Expand Down Expand Up @@ -28,5 +33,6 @@ export class CreatePostDto {
})
@IsString({ each: true })
@IsNotEmpty()
@ArrayNotEmpty()
imageUrls: string[] = [];
}

0 comments on commit 9e74a33

Please sign in to comment.