I've tried adding the properties file in the src folder and in the project root. I'm trying to build the project using eclipse, which is what I use to develop the project.
Is it also the case that the value of the message property of the annotation is used as a key in the validationMessages file? that is, can I use this: @NotEmpty(message="my.custom.property") and it will find the "cannot be empty" value in the following validationMessages.properties file: my.custom.property=cannot be empty Thanks again for your help Marius Gundersen On Wed, Feb 13, 2013 at 5:08 PM, Matt Benson <[email protected]> wrote: > More or less. Exactly where in your project layout are you putting the > properties file? > > Matt > > > On Wed, Feb 13, 2013 at 2:36 AM, Marius Gundersen <[email protected]>wrote: > >> I am struggling with getting custom validation messages to work. As far >> as I can tell, I should be able to create a properties file in the root of >> the project, and bval will use it when writing the messages. Is this >> correct? >> >> My project is very simple, without Hibernate or Spring, but it uses BVal >> for validation. I'm not too familiar with properties files, so I don't know >> if there is something I should be doing which I'm not. According to the >> documentation I should only have to add a properties file, and bval will >> use the messages in that file. Is this correct? >> >> Thank you for your help, >> Marius Gundersen >> > >
