Skip to content

Commit

Permalink
[feat] Vendor 생성은 비밀번호를 8자부터 허용한다.
Browse files Browse the repository at this point in the history
검증 로직 수정
  • Loading branch information
Dr-KoKo committed Aug 11, 2024
1 parent 0900ed4 commit 3abdeb9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/camp/woowak/lab/vendor/domain/Vendor.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ private void checkPassword(String password) throws InvalidCreationException {
if (password == null || password.isBlank()) {
throw new InvalidCreationException("Vendor password cannot be blank");
}
if (password.trim().length() > 30) {
throw new InvalidCreationException("Vendor password cannot be longer than 30 characters");
if (password.trim().length() < 8 || password.trim().length() > 30) {
throw new InvalidCreationException(
"Vendor password must be at least 8 characters and at most 30 characters");
}
}

Expand Down

0 comments on commit 3abdeb9

Please sign in to comment.