Skip to content

Commit

Permalink
[Refactor] #352 - 아이디 정규식 검증 DTO에 추가 및 수정 (회원가입, 로그인, 아이디 DB 조회)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjKim1229 committed Aug 22, 2023
1 parent 61b43da commit d3ee567
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@Getter
public class UserAuthenticateInDTO {

@Pattern(regexp = "^[a-z0-9]{5,20}$")
@Pattern(regexp = "^(?!\\d+$)[a-z\\d]{5,20}$", message = "올바른 아이디 형식이 아닙니다")
@NotBlank
@Schema(description = "로그인 아이디", example = "cazait1234")
private String accountName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class UserCreateInDTO {

@Pattern(regexp = "^[a-z0-9]{5,20}$", message = "올바른 아이디 형식이 아닙니다")
@Pattern(regexp = "^(?!\\d+$)[a-z\\d]{5,20}$", message = "올바른 아이디 형식이 아닙니다")
@NotBlank
@Schema(description = "로그인 아이디", example = "cazait1234")
private String accountName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
public class UserFindExistAccountNameInDTO {


@Pattern(regexp = "^(?!\\d+$)[a-z\\d]{5,20}$", message = "올바른 아이디 형식이 아닙니다")
@NotBlank
@Schema(description = "로그인 아이디", example = "cazait1234")
private String accountName;
Expand Down

0 comments on commit d3ee567

Please sign in to comment.