If I have a validation annotation like this:
Code:
@Size(min = 2, max = 50, message="{name.required}")
and a ValidationMessage.properties file like this:
Code:
name.required=Invalid name '{value}', should be from {min} to {max} characters
Is it possible to interpolate the invalid value (e.g. '{value}') of the ConstraintViolation into the message? It seems only annotation based parameters, e.g. '{min}' and '{max}' can be interpolated. The same question would apply to the path of the failing property, e.g. '{path}'.
The resulting error message should be
"Invalid name 'A', should be from 2 to 50 characters"
I'm using 4.0.2 GA.
Thanks,
Jeroen