-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: TempTalkPick의 모든 필드를 공백 허용하도록 수정 * refactor: DTO 필드 검증 로직 분리 * refactor: override 명시
- Loading branch information
Showing
4 changed files
with
35 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/main/java/balancetalk/talkpick/dto/BaseTempTalkPickFields.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package balancetalk.talkpick.dto; | ||
|
||
import jakarta.validation.constraints.NotBlank; | ||
|
||
public class BaseTempTalkPickFields extends BaseTalkPickFields { | ||
|
||
public BaseTempTalkPickFields(String title, String content, String optionA, String optionB, String sourceUrl) { | ||
super(title, content, optionA, optionB, sourceUrl); | ||
} | ||
|
||
@NotBlank(message = "제목은 공백을 허용하지 않습니다.") | ||
@Override | ||
public String getTitle() { | ||
return super.getTitle(); | ||
} | ||
|
||
@NotBlank(message = "본문 내용은 공백을 허용하지 않습니다.") | ||
@Override | ||
public String getContent() { | ||
return super.getContent(); | ||
} | ||
|
||
@NotBlank(message = "선택지 이름은 공백을 허용하지 않습니다.") | ||
@Override | ||
public String getOptionA() { | ||
return super.getOptionA(); | ||
} | ||
|
||
@NotBlank(message = "선택지 이름은 공백을 허용하지 않습니다.") | ||
@Override | ||
public String getOptionB() { | ||
return super.getOptionA(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters