Top Methods
org.hibernate.validator.constraintvalidation

public Interface HibernateConstraintViolationBuilder

extends ConstraintViolationBuilder
Known Direct Implementers
org.hibernate.validator.internal.engine.constraintvalidation.ConstraintValidatorContextImpl.ConstraintViolationBuilderImpl
Imports
jakarta.validation.ConstraintValidatorContext.ConstraintViolationBuilder, org.hibernate.validator.Incubating, org.hibernate.validator.messageinterpolation.ExpressionLanguageFeatureLevel

Method Summary

Modifier and TypeMethod and Description
public default HibernateConstraintViolationBuilder
enableExpressionLanguage()

Enable Expression Language with the default Expression Language feature level for the constraint violation created by this builder if the chosen MessageInterpolator supports it.

public HibernateConstraintViolationBuilder
enableExpressionLanguage(ExpressionLanguageFeatureLevel
The Expression Language features level supported.
level
)

Enable Expression Language for the constraint violation created by this builder if the chosen MessageInterpolator supports it.

Inherited from jakarta.validation.ConstraintValidatorContext.ConstraintViolationBuilder:
addBeanNodeaddConstraintViolationaddContainerElementNodeaddNodeaddParameterNodeaddPropertyNode

Method Detail

enableExpressionLanguageback to summary
public default HibernateConstraintViolationBuilder enableExpressionLanguage()

Enable Expression Language with the default Expression Language feature level for the constraint violation created by this builder if the chosen MessageInterpolator 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.

Annotations
@Incubating
Since
6.2
enableExpressionLanguageback to summary
public HibernateConstraintViolationBuilder enableExpressionLanguage(ExpressionLanguageFeatureLevel level)

Enable Expression Language for the constraint violation created by this builder if the chosen MessageInterpolator 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:ExpressionLanguageFeatureLevel

The Expression Language features level supported.

Annotations
@Incubating
Since
6.2