All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.validator.constraintvalidation.HibernateConstraintViolationBuilder Maven / Gradle / Ivy

Go to download

JPMS Module-Info's for a few of the Jakarta Libraries. These will be removed as time goes by

There is a newer version: 62
Show newest version
/*
 * Hibernate Validator, declare and validate application constraints
 *
 * License: Apache License, Version 2.0
 * See the license.txt file in the root directory or .
 */

package org.hibernate.validator.constraintvalidation;

import jakarta.validation.ConstraintValidatorContext.ConstraintViolationBuilder;

import org.hibernate.validator.Incubating;
import org.hibernate.validator.messageinterpolation.ExpressionLanguageFeatureLevel;

public interface HibernateConstraintViolationBuilder extends ConstraintViolationBuilder {

	/**
	 * Enable Expression Language with the default Expression Language feature level for the constraint violation
	 * created by this builder if the chosen {@code 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 {@code addExpressionVariable()} to inject properly escaped variables into the template. * * @since 6.2 */ @Incubating default HibernateConstraintViolationBuilder enableExpressionLanguage() { return enableExpressionLanguage( ExpressionLanguageFeatureLevel.DEFAULT ); }; /** * Enable Expression Language for the constraint violation created by this builder if the chosen * {@code 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 {@code addExpressionVariable()} to inject properly escaped variables into the template. * * @param level The Expression Language features level supported. * @since 6.2 */ @Incubating HibernateConstraintViolationBuilder enableExpressionLanguage(ExpressionLanguageFeatureLevel level); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy