Skip to content

Commit

Permalink
feat : 인슈보딩 입력 시 추가 검증 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
1000kkannoo committed Jul 26, 2024
1 parent be19dd3 commit 32a4f49
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

import cmc15.backend.domain.account.entity.InsuranceCompany;
import cmc15.backend.domain.account.entity.InsuranceType;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand Down Expand Up @@ -39,13 +41,18 @@ public static class Age {
@Getter
public static class InsureBoarding {
private String gender;

@Valid
private List<InsureBoard> insureBoards;

@AllArgsConstructor
@NoArgsConstructor
@Getter
public static class InsureBoard {
@NotNull(message = "보험 유형은 필수 값 입니다.")
private InsuranceType insuranceType;

@NotNull(message = "보험 회사는 필수 값 입니다.")
private InsuranceCompany insuranceCompany;
}
}
Expand Down

0 comments on commit 32a4f49

Please sign in to comment.