Interface HibernateConstraintViolationBuilder
- All Superinterfaces:
ConstraintValidatorContext.ConstraintViolationBuilder
- All Known Implementing Classes:
ConstraintValidatorContextImpl.ConstraintViolationBuilderImpl
public interface HibernateConstraintViolationBuilder
extends ConstraintValidatorContext.ConstraintViolationBuilder
-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.validation.ConstraintValidatorContext.ConstraintViolationBuilder
ConstraintValidatorContext.ConstraintViolationBuilder.ContainerElementNodeBuilderCustomizableContext, ConstraintValidatorContext.ConstraintViolationBuilder.ContainerElementNodeBuilderDefinedContext, ConstraintValidatorContext.ConstraintViolationBuilder.ContainerElementNodeContextBuilder, ConstraintValidatorContext.ConstraintViolationBuilder.LeafNodeBuilderCustomizableContext, ConstraintValidatorContext.ConstraintViolationBuilder.LeafNodeBuilderDefinedContext, ConstraintValidatorContext.ConstraintViolationBuilder.LeafNodeContextBuilder, ConstraintValidatorContext.ConstraintViolationBuilder.NodeBuilderCustomizableContext, ConstraintValidatorContext.ConstraintViolationBuilder.NodeBuilderDefinedContext, ConstraintValidatorContext.ConstraintViolationBuilder.NodeContextBuilder
-
Method Summary
Modifier and TypeMethodDescriptionEnable Expression Language with the default Expression Language feature level for the constraint violation created by this builder if the chosenMessageInterpolator
supports it.Enable Expression Language for the constraint violation created by this builder if the chosenMessageInterpolator
supports it.Methods inherited from interface jakarta.validation.ConstraintValidatorContext.ConstraintViolationBuilder
addBeanNode, addConstraintViolation, addContainerElementNode, addNode, addParameterNode, addPropertyNode
-
Method Details
-
enableExpressionLanguage
Enable Expression Language with the default Expression Language feature level for the constraint violation created by this builder if the chosenMessageInterpolator
supports it.If you enable this, you need to make sure your message template does not contain any unescaped user input (such as the validated value): use
addExpressionVariable()
to inject properly escaped variables into the template.- Since:
- 6.2
-
enableExpressionLanguage
@Incubating HibernateConstraintViolationBuilder enableExpressionLanguage(ExpressionLanguageFeatureLevel level) Enable Expression Language for the constraint violation created by this builder if the chosenMessageInterpolator
supports it.If you enable this, you need to make sure your message template does not contain any unescaped user input (such as the validated value): use
addExpressionVariable()
to inject properly escaped variables into the template.- Parameters:
level
- The Expression Language features level supported.- Since:
- 6.2
-