Skip to content

Commit

Permalink
[BE] fix: Dto 하위 필드에 @Valid 추가 (#845)
Browse files Browse the repository at this point in the history
* fix: Dto 하위 필드에 `@Valid` 추가

* chore: `@Valid @ResponseBody` 순서 통일
  • Loading branch information
donghoony authored and skylar1220 committed Oct 15, 2024
1 parent 0932461 commit f3a927b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package reviewme.review.service.dto.request;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import java.util.List;
Expand All @@ -9,7 +10,7 @@ public record ReviewRegisterRequest(
@NotBlank(message = "리뷰 요청 코드를 입력해주세요.")
String reviewRequestCode,

@NotEmpty(message = "답변 내용을 입력해주세요.")
@Valid @NotEmpty(message = "답변 내용을 입력해주세요.")
List<ReviewAnswerRequest> answers
) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public ResponseEntity<ReviewGroupCreationResponse> createReviewGroup(

@PostMapping("/v2/groups/check")
public ResponseEntity<Void> checkGroupAccessCode(
@RequestBody @Valid CheckValidAccessRequest request,
@Valid @RequestBody CheckValidAccessRequest request,
HttpServletRequest httpRequest
) {
reviewGroupService.checkGroupAccessCode(request);
Expand Down

0 comments on commit f3a927b

Please sign in to comment.