public class DefaultViolationTranslator extends Object implements IViolationTranslator
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}'.| Constructor and Description |
|---|
DefaultViolationTranslator() |
| Modifier and Type | Method and Description |
|---|---|
<T> ValidationError |
convert(javax.validation.ConstraintViolation<T> violation)
Converts a
ConstraintViolation into a ValidationError |
public <T> ValidationError convert(javax.validation.ConstraintViolation<T> violation)
IViolationTranslatorConstraintViolation into a ValidationErrorconvert in interface IViolationTranslatorviolation - constraint violation from bean validationCopyright © 2006–2014 Apache Software Foundation. All rights reserved.