I'm using Hibernate Validator 3.1.0.GA. It is not looking up custom messages from ValidationMessages.properties. Here is the example project:
Code:
git clone https://bitbucket.org/sstein/validation-example.git
To illustrate the problem, I created several test cases:
Code:
mvn test
One test case is failing with:
Code:
Failed tests: validateDescriptionTest(com.example.MyClassTest): expected:<[Description must be between 1 and 10 characters long.]> but was:<[#{descriptionMsg}]>
The field is annotated with:
Code:
@Length(min = 1, max = 10, message ="{descriptionMsg}")
And I got in src/main/resources/ValidationMessages.properties:
Code:
Description must be between 1 and 10 characters long.
I also tried moving the property file around, but without any luck.
Any idea what is going wrong here?