Interface HibernateConstraintViolationBuilder

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

public interface HibernateConstraintViolationBuilder extends ConstraintValidatorContext.ConstraintViolationBuilder
  • 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