[
http://opensource.atlassian.com/projects/hibernate/browse/HV-297?page=com...
]
Hardy Ferentschik updated HV-297:
---------------------------------
Summary: Custom error messages built via ConstraintValidatorContext get ignored when
constraint uses @ReportAsSingleViolation (was: The use of
buildConstraintViolationWithTemplate whilst using jsr303 validation to validation a class
fails to alter the default error message)
Custom error messages built via ConstraintValidatorContext get
ignored when constraint uses @ReportAsSingleViolation
--------------------------------------------------------------------------------------------------------------------
Key: HV-297
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HV-297
Project: Hibernate Validator
Issue Type: Bug
Components: engine
Affects Versions: 4.0.2.GA
Environment: Hibernate version 4.02GA Java 1.6 Solaris and Mac OSX
Reporter: Chris March
Assignee: Hardy Ferentschik
Fix For: 4.1.0-Beta-1
Attachments: TestProject.zip
When creating a custom Validator to validate a class, when overriding the isValid method
it is supposed to be possible to return a custom error message as opposed to the default
error message, by calling methods on the passed in ConstraintValidatorContext object.
This appears simply not to work
I have attached an example Junit test case which shows the problem happening
I have included all the associated jars in the zip as I was unsure if that was the
correct thing to do or not.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira