Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ public static Gender fromName(String genderName) {
.filter(g -> g.getGenderName().equals(genderName))
.findFirst()
.orElseThrow(
() -> new CustomRuntimeException(ErrorCode.INVAILD_GENDER));
() -> new CustomRuntimeException(ErrorCode.INVALID_GENDER));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import java.lang.annotation.Target;

@Pattern(
regexp = "^01[016789]-\\d{3,4}-\\d{4}$",
regexp = "^(|01[016789]-\\d{3,4}-\\d{4})$",
message = "전화번호 형식은 010-XXXX-XXXX 이어야 합니다."
Comment on lines +12 to 13

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While the regular expression has been correctly updated to allow an empty string, the validation message on the following line is now inconsistent. It should be updated to reflect that an empty value is also permissible, which will prevent confusion for the user.

        regexp = "^(|01[016789]-\d{3,4}-\d{4})$",
        message = "전화번호는 010-XXXX-XXXX 형식이거나 비어있어도 됩니다."

)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ public enum ErrorCode {
USER_INFO_INVALID(HttpStatus.BAD_REQUEST, "유효하지 않은 사용자 정보입니다."),
USER_NOT_ACCESS_FORBIDDEN(HttpStatus.BAD_REQUEST, "접근 권한이 없는 사용자입니다"),
USER_SAVE_FAILED(HttpStatus.INTERNAL_SERVER_ERROR, "사용자 저장에 실패했습니다."),
INVAILD_GENDER(HttpStatus.BAD_REQUEST, "유효하지 않은 성별 값입니다."),
// 신청 관련 에러
WRONG_SUBJECT_TYPE(HttpStatus.BAD_REQUEST, "잘못된 과목명 입니다."),
WRONG_LUNCH_TYPE(HttpStatus.BAD_REQUEST, "잘못된 도시락명 입니다."),
Expand Down