Interface HibernateConstraintViolationBuilder

All Superinterfaces:
jakarta.validation.ConstraintValidatorContext.ConstraintViolationBuilder
All Known Implementing Classes:
ConstraintValidatorContextImpl.ConstraintViolationBuilderImpl

public interface HibernateConstraintViolationBuilder extends jakarta.validation.ConstraintValidatorContext.ConstraintViolationBuilder
  • Nested Class Summary

    Nested classes/interfaces inherited from interface jakarta.validation.ConstraintValidatorContext.ConstraintViolationBuilder

    jakarta.validation.ConstraintValidatorContext.ConstraintViolationBuilder.ContainerElementNodeBuilderCustomizableContext, jakarta.validation.ConstraintValidatorContext.ConstraintViolationBuilder.ContainerElementNodeBuilderDefinedContext, jakarta.validation.ConstraintValidatorContext.ConstraintViolationBuilder.ContainerElementNodeContextBuilder, jakarta.validation.ConstraintValidatorContext.ConstraintViolationBuilder.LeafNodeBuilderCustomizableContext, jakarta.validation.ConstraintValidatorContext.ConstraintViolationBuilder.LeafNodeBuilderDefinedContext, jakarta.validation.ConstraintValidatorContext.ConstraintViolationBuilder.LeafNodeContextBuilder, jakarta.validation.ConstraintValidatorContext.ConstraintViolationBuilder.NodeBuilderCustomizableContext, jakarta.validation.ConstraintValidatorContext.ConstraintViolationBuilder.NodeBuilderDefinedContext, jakarta.validation.ConstraintValidatorContext.ConstraintViolationBuilder.NodeContextBuilder
  • Method Summary

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

    Methods inherited from interface jakarta.validation.ConstraintValidatorContext.ConstraintViolationBuilder

    addBeanNode, addConstraintViolation, addContainerElementNode, addNode, addParameterNode, addPropertyNode
  • Method Details

    • enableExpressionLanguage

      @Incubating 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.

      Since:
      6.2
    • enableExpressionLanguage

      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 - The Expression Language features level supported.
      Since:
      6.2