Skip to content

Commit

Permalink
Merge pull request #82 from mju-likelion/feature/application-agreemen…
Browse files Browse the repository at this point in the history
…t-assert-true-validation-#81

Feature/#81 지원서 제출 시 동의 항목 True인지 검증
  • Loading branch information
Dh3356 authored Feb 25, 2024
2 parents 7b78d60 + 9fedd44 commit 23fdcde
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ public enum ValidationErrorCode {
NOT_BLANK("9002", "필수값이 빈 값이거나 공백으로 되어있습니다."),
REGEX("9003", "형식에 맞지 않습니다."),
ENUM_CONSTRAINT("9004", "유효하지 않은 Enum 값입니다."),
GRADE_CONSTRAINT("9005", "학년이 형식에 맞지 않습니다.");
GRADE_CONSTRAINT("9005", "학년이 형식에 맞지 않습니다."),
AGREEMENT_ASSERT_TRUE("9006", "동의가 필요합니다.");


private final String code;
Expand All @@ -25,6 +26,7 @@ public static ValidationErrorCode resolveAnnotation(String code) {
case "Pattern" -> REGEX;
case "EnumConstraint" -> ENUM_CONSTRAINT;
case "GradeConstraint" -> GRADE_CONSTRAINT;
case "AssertTrue" -> AGREEMENT_ASSERT_TRUE;
default -> throw new IllegalArgumentException("Unexpected value: " + code);
};
}
Expand Down

0 comments on commit 23fdcde

Please sign in to comment.