From 1f8821d5b6c297fc6fa62cf0e423352412a7ab1c Mon Sep 17 00:00:00 2001 From: youngreal <59333182+youngreal@users.noreply.github.com> Date: Fri, 1 Nov 2024 15:20:30 +0900 Subject: [PATCH] =?UTF-8?q?Validation=20Annotation=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../auth/controller/request/validation/ColorValidation.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/dnd/dndtravel/auth/controller/request/validation/ColorValidation.java b/src/main/java/com/dnd/dndtravel/auth/controller/request/validation/ColorValidation.java index b8c5961..ee8cde9 100644 --- a/src/main/java/com/dnd/dndtravel/auth/controller/request/validation/ColorValidation.java +++ b/src/main/java/com/dnd/dndtravel/auth/controller/request/validation/ColorValidation.java @@ -6,11 +6,14 @@ import java.lang.annotation.Target; import jakarta.validation.Constraint; +import jakarta.validation.Payload; @Constraint(validatedBy = {ColorValidator.class}) @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) public @interface ColorValidation { String message() default "invalid region"; + Class[] groups() default {}; // 추가 + Class[] payload() default {}; // 추가 Class> enumClass(); }