From e76c8dffc215c721f7e4a3772274ec69ae1bb8ca Mon Sep 17 00:00:00 2001 From: pkl0912 Date: Fri, 19 Jan 2024 13:54:42 +0900 Subject: [PATCH] =?UTF-8?q?#175=20[feat]=20bad=20request=20=EC=83=81?= =?UTF-8?q?=EC=88=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../moddy/server/common/exception/enums/ErrorCode.java | 8 ++++++++ .../designer/dto/request/DesignerCreateRequest.java | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/moddy/server/common/exception/enums/ErrorCode.java b/src/main/java/com/moddy/server/common/exception/enums/ErrorCode.java index f9f29b65..1e5e57ab 100644 --- a/src/main/java/com/moddy/server/common/exception/enums/ErrorCode.java +++ b/src/main/java/com/moddy/server/common/exception/enums/ErrorCode.java @@ -22,6 +22,14 @@ public enum ErrorCode { INVALID_VALUE_TYPE_EXCEPTION(HttpStatus.BAD_REQUEST, "유효하지 않은 타입 값을 입력했습니다."), VALIDATION_REQUEST_MISSING_EXCEPTION(HttpStatus.BAD_REQUEST, "요청값이 유효하지 않습니다."), INVALID_PHONE_NUMBER_EXCEPTION(HttpStatus.BAD_REQUEST, "유효하지 않은 전화번호를 입력했습니다."), + INVALID_NAME_EXCEPTION(HttpStatus.BAD_REQUEST, "name은 1~10 글자수 사이의 글자입니다."), + INVALID_INTRODUCTION_EXCEPTION(HttpStatus.BAD_REQUEST, "introduction은 1~200 글자수 사이의 글자입니다."), + INVALID_URL_EXCEPTION(HttpStatus.BAD_REQUEST, "url에는 공백(whitespaces)이 들어갈 수 없습니다."), + INVALID_HAIRSHOP_NAME_EXCEPTION(HttpStatus.BAD_REQUEST, "name은 1~25 글자수 사이의 글자입니다."), + INVALID_IS_MARKETING_AGREE_EXCEPTION(HttpStatus.BAD_REQUEST, "marketing 동의 여부는 true, false만 가능합니다."), + INVALID_HAIRSHOP_DETAIL_ADDRESS_EXCEPTION(HttpStatus.BAD_REQUEST, "상세주소는 1~30 글자수 사이의 글자입니다."), + INVALID_OFFER_DETAIL_EXCEPTION(HttpStatus.BAD_REQUEST, "상세제안은 1~200 글자수 사이의 글자입니다."), + INVALID_PREFER_OFFER_CONDITION_EXCEPTION(HttpStatus.BAD_REQUEST, "최소 한 개 이상의 희망 제안 조건이 필요합니다"), // 401 TOKEN_NOT_CONTAINED_EXCEPTION(HttpStatus.UNAUTHORIZED, "Access Token이 필요합니다."), diff --git a/src/main/java/com/moddy/server/controller/designer/dto/request/DesignerCreateRequest.java b/src/main/java/com/moddy/server/controller/designer/dto/request/DesignerCreateRequest.java index d8620407..1cd08185 100644 --- a/src/main/java/com/moddy/server/controller/designer/dto/request/DesignerCreateRequest.java +++ b/src/main/java/com/moddy/server/controller/designer/dto/request/DesignerCreateRequest.java @@ -28,7 +28,7 @@ public record DesignerCreateRequest( Gender gender, @Schema(example = "01020000000") @NotBlank - @Pattern(regexp = "^010[0-9]{8}$", message = "phoneNumber는 01011112222형태입니다.") + @Pattern(regexp = "^010[0-9]{8}$", message = "phoneNumber는 010####$$$$형태입니다.") String phoneNumber, @Schema(example = "true") boolean isMarketingAgree,