-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: 닉네임 중복, 이메일형식 검증 추가 (#276)
* refactor 닉네임 중복, 이메일형식 검증 추가 * Exception status code 수정, 백준아이디 유효성 검증 * check함수로 빼기.. * 비밀번호 형식 검증 추가 * test 살짝 수정.. * 정규식 주석 달기
- Loading branch information
Showing
5 changed files
with
83 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/main/java/com/gamzabat/algohub/feature/user/exception/CheckEmailFormException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.gamzabat.algohub.feature.user.exception; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public class CheckEmailFormException extends RuntimeException { | ||
private final int code; | ||
private final String errors; | ||
|
||
public CheckEmailFormException(int code, String errors) { | ||
this.code = code; | ||
this.errors = errors; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/com/gamzabat/algohub/feature/user/exception/CheckPasswordFormException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.gamzabat.algohub.feature.user.exception; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public class CheckPasswordFormException extends RuntimeException { | ||
private final int code; | ||
private final String errors; | ||
|
||
public CheckPasswordFormException(int code, String errors) { | ||
this.code = code; | ||
this.errors = errors; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,7 +78,7 @@ class UserServiceTest { | |
private ArgumentCaptor<User> userCaptor; | ||
|
||
private final String email = "[email protected]"; | ||
private final String password = "password"; | ||
private final String password = "password1!"; | ||
private final String nickname = "nickname"; | ||
private final String encoded = "encoded"; | ||
private final String imageUrl = "[email protected]_image.jpg"; | ||
|