Do you know how is it possible to modify the error message displayed when there is a validation error (package javax.validation.constraints) during a form binding ?
Consider a simple entity with a field like :
@Past // A date must be older than now
@Formats.DateTime(pattern="dd/MM/yyyy")
private Date birthday = new Date();
I would like to customize the message displayed when the date format is correct but newer than now (so the Past validation will fail). So I added the following line into the conf\messages file :
javax.validation.constraints.Past.message=Customized message
But it doesn't work... It is still the default message that is displayed.