From 0db18a11528bac9193bc235199b93e60a6c860bf Mon Sep 17 00:00:00 2001 From: Mingadinga Date: Sun, 28 Aug 2022 00:21:23 +0900 Subject: [PATCH] add validation check on PostSaveRequestDto.java #4 --- src/main/java/com/team20/t4/post/PostSaveRequestDto.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/team20/t4/post/PostSaveRequestDto.java b/src/main/java/com/team20/t4/post/PostSaveRequestDto.java index aea2153..b498e33 100644 --- a/src/main/java/com/team20/t4/post/PostSaveRequestDto.java +++ b/src/main/java/com/team20/t4/post/PostSaveRequestDto.java @@ -4,12 +4,17 @@ import lombok.Getter; import lombok.NoArgsConstructor; +import javax.validation.constraints.Size; + @Getter @NoArgsConstructor @AllArgsConstructor public class PostSaveRequestDto { + @Size(max = 255, message = "title은 255자 이하여야합니다.") private String title; + @Size(max = 1000, message = "content는 1000자 이하여야합니다.") private String content; + @Size(max = 255, message = "chatRoomLink는 255자 이하여야합니다.") private String chatRoomLink; // private PlanSaveRequestDto plan; }