Skip to content

Commit

Permalink
fix: 유효성 검증 상수화 했던 것 Wrapper 타입으로 인해 build 에러 -> 원시 타입으로 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
jo0oy committed Dec 15, 2023
1 parent 017c083 commit c9e45b8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ public class ReservationValidationConstants {

// regex
public static final String DATE_REGEX = "^\\d{4}-\\d{2}-\\d{2}$";
public static final Integer RESERVATION_REQ_MIN_SIZE = 1;
public static final Integer RESERVATION_REQ_MAX_SIZE = 3;
public static final Integer TOTAL_PRICE_MIN_VALUE = 0;
public static final int RESERVATION_REQ_MIN_SIZE = 1;
public static final int RESERVATION_REQ_MAX_SIZE = 3;
public static final int TOTAL_PRICE_MIN_VALUE = 0;

// validation message
public static final String DATE_PATTERN_MESSAGE = "올바른 날짜 형식이 아닙니다.(yyyy-MM-dd 형식으로 입력하세요.)";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public class ReservationRestController {
private final PreoccupyRoomsLockFacade preoccupyRoomsLockFacade;
private final ReservationLockFacade reservationLockFacade;
private final SecurityUtil securityUtil;
private static final Integer PAGE_SIZE = 10;
private static final Integer PAGE_NUM = 0;
private static final int PAGE_SIZE = 10;
private static final int PAGE_NUM = 0;
private static final String PAGE_SORT_BY = "id";

@PostMapping
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
public record ReleaseRoomItemRequestDto(
@NotNull
Long roomId,
@Pattern(regexp = DATE_REGEX, message = "올바른 날짜 형식이 아닙니다.(yyyy-MM-dd 형식으로 입력하세요.)")
@Pattern(regexp = DATE_REGEX, message = DATE_PATTERN_MESSAGE)
String startDate,
@Pattern(regexp = DATE_REGEX, message = "올바른 날짜 형식이 아닙니다.(yyyy-MM-dd 형식으로 입력하세요.)")
@Pattern(regexp = DATE_REGEX, message = DATE_PATTERN_MESSAGE)
String endDate
) {
}

0 comments on commit c9e45b8

Please sign in to comment.