Skip to content

Commit

Permalink
♻️ Refactor: 회원가입 validation 추가(#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoungj00n committed Apr 14, 2024
1 parent bd450e2 commit 18b2a03
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

import javax.persistence.Column;
import javax.persistence.criteria.CriteriaBuilder;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.util.Date;
import java.util.List;

Expand All @@ -18,12 +21,21 @@ public class MemberRequestDTO {
@NoArgsConstructor
@AllArgsConstructor
public static class JoinDTO {
@NotBlank(message = "닉네임을 입력해주세요")
private String nickname;
@NotBlank(message = "이름을 입력해주세요")
private String name;
@NotBlank(message = "비밀번호를 입력해주세요")
@Pattern(regexp = "(?=.*[0-9])(?=.*[a-zA-Z])(?=.*\\W)(?=\\S+$).{8,16}", message = "비밀번호는 8~16자 영문, 숫자, 특수문자를 사용하세요.")
private String password;
@NotBlank(message = "이메일을 입력해주세요")
@Email(message = "이메일 형식이 올바르지 않습니다.")
private String email;
@NotBlank(message = "생일을 입력해주세요")
private Date birthday;
@NotBlank(message = "휴대폰 번호를 입력해주세요")
private String phone;
@NotBlank(message = "성별을 입력해주세요")
private Gender gender;
private List<Boolean> memberTerm;//약관 동의

Expand Down

0 comments on commit 18b2a03

Please sign in to comment.