I have developed a series of validation annotations that I want to be JSR-303 compliant. However, I want the messages to be pulled from a common resource bundle (packaged in a separate jar file) with a parameter (or parameters) coming from the annotation's message attribute (or another attribute(s)). Is that possible with the current version of the spec?
This feature is very important to us because it allows us to specify the meat of the message, thus allowing a consistent user experience in all of our web applications. It is also important for us to specify most of the message because the vast majority of our developers are not native English speakers. For instance, in the message, "The field user name contains illegal characters. Please use only alphanumeric characters, periods, whitespace and single dashes.", only 'user name' is specified by the developer (as literal text or a key to a record in a local resource bundle).
|