diff --git a/src/main/java/com/fc/shimpyo_be/domain/member/dto/request/SignUpRequestDto.java b/src/main/java/com/fc/shimpyo_be/domain/member/dto/request/SignUpRequestDto.java index 77470d5..ed0425f 100644 --- a/src/main/java/com/fc/shimpyo_be/domain/member/dto/request/SignUpRequestDto.java +++ b/src/main/java/com/fc/shimpyo_be/domain/member/dto/request/SignUpRequestDto.java @@ -15,22 +15,22 @@ @NoArgsConstructor(access = AccessLevel.PROTECTED) public class SignUpRequestDto { - private final String emailRegexp = "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"; - private final String passwordRegexp = "^(?=.*[A-Za-z])(?=.*\\d)(?=.*[@$#^()!%*?&])[A-Za-z\\d@$!#^()%*?&]{8,30}$"; - private final int nameMin = 2; - private final int nameMax = 30; + private static final String EMAIL_REGEX = "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"; + private static final int NAME_MIN = 2; + private static final int NAME_MAX = 30; + private static final String PASSWORD_REGEX = "^(?=.*[A-Za-z])(?=.*\\d)(?=.*[@$#^()!%*?&])[A-Za-z\\d@$!#^()%*?&]{8,30}$"; @NotBlank(message = "이메일을 입력하세요.") - @Pattern(regexp = emailRegexp, message = "이메일 형식에 맞게 입력해주세요.") + @Pattern(regexp = EMAIL_REGEX, message = "이메일 형식에 맞게 입력해주세요.") private String email; @NotBlank(message = "이름을 입력하세요.") - @Size(min = nameMin, max = nameMax, message = "이름은 최소 2자 이상 최대 30자 이내로 입력하세요.") + @Size(min = NAME_MIN, max = NAME_MAX, message = "이름은 최소 2자 이상 최대 30자 이내로 입력하세요.") private String name; @NotBlank(message = "비밀번호를 입력하세요.") - @Pattern(regexp = passwordRegexp) + @Pattern(regexp = PASSWORD_REGEX) private String password; @NotBlank(message = "비밀번호 확인을 입력하세요.") - @Pattern(regexp = passwordRegexp) + @Pattern(regexp = PASSWORD_REGEX) private String passwordConfirm; @Builder