Skip to content

Commit f6b7388

Browse files
DavideDmarko-bekhta
authored andcommitted
HV-1591 Create warning log message for improper use of Valid
1 parent 7c414c3 commit f6b7388

File tree

1 file changed

+4
-0
lines changed
  • engine/src/main/java/org/hibernate/validator/internal/util/logging

1 file changed

+4
-0
lines changed

engine/src/main/java/org/hibernate/validator/internal/util/logging/Log.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,4 +950,8 @@ ConstraintDefinitionException getConstraintValidatorDefinitionConstraintMismatch
950950
@LogMessage(level = WARN)
951951
@Message(id = 270, value = "Message resource bundle for the %1$s locale is not available and was not pre-loaded.")
952952
void resourceBundleNotPreLoaded(Locale localeToPreload);
953+
954+
@LogMessage(level = WARN)
955+
@Message(id = 271, value = "Using `@Valid` on a container (%1$s) is deprecated. You should apply the annotation on the type argument(s). Field name: %2$s")
956+
void deprecatedUseOfValidOnContainer(@FormatWith(ClassObjectFormatter.class) Class<?> valueType, Object context);
953957
}

0 commit comments

Comments
 (0)