Class DefaultViolationTranslator
java.lang.Object
org.apache.wicket.bean.validation.DefaultViolationTranslator
- All Implemented Interfaces:
IViolationTranslator
A default implementation of
IViolationTranslator
. The validation error is created with
the constraint violation's default error message. Further, the violation is checked for a message
key and if is found it is also added as a message key to the validation error. The keys are only
used if they are in the bean validation's default format of '{key}'.- Author:
- igor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> ValidationError
convert
(jakarta.validation.ConstraintViolation<T> violation) Converts aConstraintViolation
into aValidationError
-
Constructor Details
-
DefaultViolationTranslator
public DefaultViolationTranslator()
-
-
Method Details
-
convert
Description copied from interface:IViolationTranslator
Converts aConstraintViolation
into aValidationError
- Specified by:
convert
in interfaceIViolationTranslator
- Parameters:
violation
- constraint violation from bean validation- Returns:
- validation validation error to be reported on the component
-