Class ConstraintViolations

java.lang.Object
fr.paris.lutece.portal.util.mvc.binding.validate.ConstraintViolations

public class ConstraintViolations extends Object
Utility class for handling constraint violations in the context of MVC validation. This class provides methods to extract metadata from constraint violations, including annotations on properties and method parameters. It is used to enhance error reporting and provide additional context for validation errors in the MVC lutece framework.
  • Method Details

    • getMetadata

      public static ConstraintViolationMetadata getMetadata(jakarta.validation.ConstraintViolation<?> violation)
      Extracts metadata from a ConstraintViolation, including annotations on the property or method parameter that caused the violation.
      Parameters:
      violation - the ConstraintViolation to extract metadata from
      Returns:
      a ConstraintViolationMetadata object containing the violation and its annotations