diff --git a/src/main/java/shop/cazait/domain/auth/dto/UserAuthenticateInDTO.java b/src/main/java/shop/cazait/domain/auth/dto/UserAuthenticateInDTO.java index c3f0a3ef..9b4ab034 100644 --- a/src/main/java/shop/cazait/domain/auth/dto/UserAuthenticateInDTO.java +++ b/src/main/java/shop/cazait/domain/auth/dto/UserAuthenticateInDTO.java @@ -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; diff --git a/src/main/java/shop/cazait/domain/user/dto/request/UserCreateInDTO.java b/src/main/java/shop/cazait/domain/user/dto/request/UserCreateInDTO.java index e6423818..88ffe740 100644 --- a/src/main/java/shop/cazait/domain/user/dto/request/UserCreateInDTO.java +++ b/src/main/java/shop/cazait/domain/user/dto/request/UserCreateInDTO.java @@ -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; diff --git a/src/main/java/shop/cazait/domain/user/dto/request/UserFindExistAccountNameInDTO.java b/src/main/java/shop/cazait/domain/user/dto/request/UserFindExistAccountNameInDTO.java index b7719aea..afd45661 100644 --- a/src/main/java/shop/cazait/domain/user/dto/request/UserFindExistAccountNameInDTO.java +++ b/src/main/java/shop/cazait/domain/user/dto/request/UserFindExistAccountNameInDTO.java @@ -16,6 +16,7 @@ public class UserFindExistAccountNameInDTO { + @Pattern(regexp = "^(?!\\d+$)[a-z\\d]{5,20}$", message = "올바른 아이디 형식이 아닙니다") @NotBlank @Schema(description = "로그인 아이디", example = "cazait1234") private String accountName;