title: Spring validation @AssertTrue custom error code/message
body: <p>I'm using <code>javax.validation.constraints.AssertTrue</code> annotation in a form object of a Spring MVC project (Spring Boot 1.4.2).</p>
  
  <p>My class is similar to this:</p>
  
  <pre><code>public class CommandForm {
  
      @NotEmpty
      @Email
      private String email;
  
      // ...
  
      @AssertTrue(message="{error.my.custom.message}")
      public boolean isValid(){
          // validate fields
      }
  }
  </code></pre>
  
  <p>Method <code>isValid</code> is invoked correctly and validation process works fine, but my custom error code is not resolved correctly.</p>
  
  <p>I have a <code>error.my.custom.message</code> field in my <code>message.properties</code> file, but when validation fails I get the <code>"{error.my.custom.message}"</code> string as error message instead of the resolved message.</p>
  
  <p>What's wrong with my code? Is this the right syntax to set a custom error code?</p>