title: Print @NotBlank message only if a field is Not Empty
body: <p>I built a form validation system using Spring mvc.
  This is my object User</p>
  
  <pre><code>public class User{
  
      @NotEmpty   
      @NotBlank
      @Size(min=3,max=20)
      private String name;    
  .....
  }
  </code></pre>
  
  <p>So far, if you don't fill the "name" field you get 3 messages:</p>
  
  <ol>
  <li>may not be empty</li>
  <li>may not be blank</li>
  <li>size must be between 3 and 20 </li>
  </ol>
  
  <p>Is there a way, for example, to get the message 2 just if the message 1 is not sent?</p>
  
  <p>I explain better: if a user doesn't fill a field I just want to print the message "may not be empty". Then, if the user fills a field with just spaces I want to print the message "may not be blank".
  Then, if the field is filled (then is not empty) and doesn't contain just spaces (then is not blank) I want to print the size message.</p>
  
  <p>Is there a way to handle this issue with annotation or I have to create my own validator class?</p>
  
  <p>I looked into it on the internet but I didn't find a solution, probably because it's difficult to explain Google what to look for.</p>