Class ValidationErrorImpl
java.lang.Object
fr.paris.lutece.portal.util.mvc.binding.validate.ValidationErrorImpl
- All Implemented Interfaces:
ParamError,ValidationError
Represents a validation error that occurs during the validation process in the MVC framework.
This class encapsulates details about the error, including the parameter name,
the constraint violation, and a human-readable error message.
-
Constructor Summary
ConstructorsConstructorDescriptionValidationErrorImpl(jakarta.validation.ConstraintViolation<?> violation, String param, String message) -
Method Summary
Modifier and TypeMethodDescriptionReturns a human-readable error message for this error.The parameter name of the value that caused the error.jakarta.validation.ConstraintViolation<?>The underlyingConstraintViolationdetected for the parameter.
-
Constructor Details
-
ValidationErrorImpl
-
-
Method Details
-
getParamName
The parameter name of the value that caused the error. This is usually the name specified in the binding annotation.- Specified by:
getParamNamein interfaceParamError- Returns:
- The name of the parameter which caused the error
-
getViolation
public jakarta.validation.ConstraintViolation<?> getViolation()The underlyingConstraintViolationdetected for the parameter.- Specified by:
getViolationin interfaceValidationError- Returns:
- The violation detected for the parameter
-
getMessage
Returns a human-readable error message for this error.- Specified by:
getMessagein interfaceParamError- Returns:
- The human-readable error message
-