Skip to content

Commit

Permalink
Merge pull request #148 from Step3-kakao-tech-campus/fix/#147
Browse files Browse the repository at this point in the history
이메일 빈칸 입력을 막기 위한 @notblank 추가
  • Loading branch information
jminkkk authored Oct 16, 2023
2 parents 94ffd1e + 6665d49 commit 589a129
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
import lombok.Builder;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Builder
public record AccountLoginDto(
@Email(message = "이메일 형식에 맞지 않습니다.")
@NotNull(message = "이메일을 입력해주세요.") String email,
@NotBlank(message = "이메일을 입력해주세요.") String email,
@NotNull(message = "비밀번호를 입력해주세요.") String password) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@


import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.NotBlank;

public record EmailValidateDto(
@NotNull(message = "이메일을 입력해주세요.")
@NotBlank(message = "이메일을 입력해주세요.")
@Email(message = "이메일 형식에 맞지 않습니다.") String email) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@

import javax.validation.Valid;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Builder
public record ShelterSignUpDto(
@Email(message = "이메일 형식에 맞지 않습니다.") String email,
@Email(message = "이메일 형식에 맞지 않습니다.")
@NotBlank(message = "이메일을 입력해주세요.") String email,
@Pattern(regexp = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[@#$%^&+=!])(?!.*\\s).{8,20}$",
message = "비밀번호는 영문 대,소문자와 숫자, 특수기호가 적어도 1개 이상씩 포함된 8자 ~ 20자의 비밀번호여야 합니다.") String password,
@NotNull(message = "보호소 이름을 입력해주세요.") String name,
Expand Down

0 comments on commit 589a129

Please sign in to comment.