title: Spring validation annotation using message with parameters
body: <p>I'm trying to use annotations with a custom message in spring/hibernate validation. What I want to do is support internationalization while being able to pass in a parameter.</p>
  
  <p>For instance, here is the field in the java class:</p>
  
  <pre><code>@NotEmpty (message = "{error.required}")
  public String name;
  </code></pre>
  
  <p><em>ValidationMessages.properties</em> has this:</p>
  
  <pre><code>error.required = {0} is a required field
  </code></pre>
  
  <p>So I'm looking for a way to pass in the field name into that message using the message annotation in the java class. Is this even possible?</p>
  
  <p>EDIT: Similar you this question: <a href="https://stackoverflow.com/questions/5467861/jsr-303-bean-validation-in-spring">JSR 303 Bean Validation in Spring</a></p>