File tree Expand file tree Collapse file tree
src/main/java/com/back/web7_9_codecrete_be/domain/auth/dto/request Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package com .back .web7_9_codecrete_be .domain .auth .dto .request ;
22
3+ import jakarta .validation .constraints .Email ;
4+ import jakarta .validation .constraints .NotBlank ;
35import lombok .Getter ;
46
57@ Getter
68public class EmailSendRequest {
9+
10+ @ NotBlank (message = "이메일은 필수입니다." )
11+ @ Email (message = "이메일 형식이 올바르지 않습니다." )
712 private String email ;
813}
Original file line number Diff line number Diff line change 11package com .back .web7_9_codecrete_be .domain .auth .dto .request ;
22
3+ import jakarta .validation .constraints .Email ;
4+ import jakarta .validation .constraints .NotBlank ;
5+ import jakarta .validation .constraints .Pattern ;
36import lombok .Getter ;
47
58@ Getter
69public class EmailVerifyRequest {
10+
11+ @ NotBlank (message = "이메일은 필수입니다." )
12+ @ Email (message = "이메일 형식이 올바르지 않습니다." )
713 private String email ;
14+
15+ @ NotBlank (message = "인증 코드는 필수입니다." )
16+ @ Pattern (
17+ regexp = "^[A-Z0-9]{6}$" ,
18+ message = "인증 코드는 영문 대문자와 숫자를 포함한 6자리여야 합니다."
19+ )
820 private String code ;
921}
Original file line number Diff line number Diff line change 11package com .back .web7_9_codecrete_be .domain .auth .dto .request ;
22
33import io .swagger .v3 .oas .annotations .media .Schema ;
4+ import jakarta .validation .constraints .Email ;
5+ import jakarta .validation .constraints .NotBlank ;
46import lombok .Getter ;
57
68@ Getter
79@ Schema (description = "로그인 요청 DTO" )
810public class LoginRequest {
11+ @ NotBlank (message = "이메일은 필수입니다." )
12+ @ Email (message = "이메일 형식이 올바르지 않습니다." )
913 @ Schema (description = "사용자 이메일" , example = "test@example.com" )
1014 private String email ;
1115
16+ @ NotBlank (message = "비밀번호는 필수입니다." )
1217 @ Schema (description = "비밀번호" , example = "1234abcd!" )
1318 private String password ;
1419}
Original file line number Diff line number Diff line change 11package com .back .web7_9_codecrete_be .domain .auth .dto .request ;
22
33import io .swagger .v3 .oas .annotations .media .Schema ;
4+ import jakarta .validation .constraints .Email ;
5+ import jakarta .validation .constraints .NotBlank ;
6+ import jakarta .validation .constraints .Pattern ;
47import lombok .Getter ;
58
69@ Getter
710@ Schema (description = "회원가입 요청 DTO" )
811public class SignupRequest {
12+
13+ @ NotBlank (message = "이메일은 필수입니다." )
14+ @ Email (message = "이메일 형식이 올바르지 않습니다." )
915 @ Schema (description = "사용자 이메일" , example = "test@example.com" )
1016 private String email ;
1117
18+ @ NotBlank (message = "닉네임은 필수입니다." )
1219 @ Schema (description = "닉네임" , example = "codeMaster" )
1320 private String nickname ;
1421
22+ @ NotBlank (message = "비밀번호는 필수입니다." )
23+ @ Pattern (
24+ regexp = "^(?=.*[A-Za-z])(?=.*\\ d)(?=.*[!@#$%^&*]).{8,}$" ,
25+ message = "비밀번호는 영문, 숫자, 특수문자를 포함한 8자 이상이어야 합니다."
26+ )
1527 @ Schema (description = "비밀번호" , example = "1234abcd!" )
1628 private String password ;
1729
30+ @ NotBlank (message = "생년월일은 필수입니다." )
31+ @ Pattern (
32+ regexp = "\\ d{4}-\\ d{2}-\\ d{2}" ,
33+ message = "생년월일은 yyyy-MM-dd 형식이어야 합니다."
34+ )
1835 @ Schema (description = "생년월일" , example = "2000-08-25" )
1936 private String birth ;
2037
You can’t perform that action at this time.
0 commit comments