Skip to content

Commit

Permalink
[chore] 오류 메세지 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
kimhyun5u committed Aug 11, 2024
1 parent a06d1c6 commit 2750dbc
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/main/java/camp/woowak/lab/customer/domain/Customer.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,37 +55,37 @@ private void checkPayAccount(PayAccount payAccount) throws InvalidCreationExcept

private void checkPhone(String phone) throws InvalidCreationException {
if (phone == null || phone.isBlank()) {
throw new InvalidCreationException("Vendor phone cannot be blank");
throw new InvalidCreationException("Customer phone cannot be blank");
}
if (phone.trim().length() > 30) {
throw new InvalidCreationException("Vendor phone cannot be longer than 30 characters");
throw new InvalidCreationException("Customer phone cannot be longer than 30 characters");
}
}

private void checkPassword(String password) throws InvalidCreationException {
if (password == null || password.isBlank()) {
throw new InvalidCreationException("Vendor password cannot be blank");
throw new InvalidCreationException("Customer password cannot be blank");
}
if (password.trim().length() > 30) {
throw new InvalidCreationException("Vendor password cannot be longer than 30 characters");
throw new InvalidCreationException("Customer password cannot be longer than 30 characters");
}
}

private void checkEmail(String email) throws InvalidCreationException {
if (email == null || email.isBlank()) {
throw new InvalidCreationException("Vendor email cannot be blank");
throw new InvalidCreationException("Customer email cannot be blank");
}
if (email.trim().length() > 100) {
throw new InvalidCreationException("Vendor email cannot be longer than 100 characters");
throw new InvalidCreationException("Customer email cannot be longer than 100 characters");
}
}

private void checkName(String name) throws InvalidCreationException {
if (name == null || name.isBlank()) {
throw new InvalidCreationException("Vendor name cannot be blank");
throw new InvalidCreationException("Customer name cannot be blank");
}
if (name.length() > 50) {
throw new InvalidCreationException("Vendor name cannot exceed 50 characters");
throw new InvalidCreationException("Customer name cannot exceed 50 characters");
}
}

Expand Down

0 comments on commit 2750dbc

Please sign in to comment.