title: How to set validation context with annotations
body: <p>Imagine I've an action <code>MyAction</code>, with a field <code>User</code> with getters and setters.</p>
  
  <p>Then I have two exposed public methods where I want to use visitor validation for the object User but with two different contexts, so that the User is validated in two different ways, depending on the method that has been called.</p>
  
  <p>I want to do this with annotations only, no validation.xml.</p>
  
  <p>See the example</p>
  
  <pre><code>public class MyAction extends ActionSupport {
      private User user;
      public User getUser() {
          return this.user;
      }
      public void setUser(User user) {
          this.user=user;
      }
  
      public string execute() {
          //some code here ...
          return SUCCESS;
      }
  
      @Validations(
          visitorFields = {@VisitorFieldValidator(context="myContext1", fieldName="user", key="error.message", message="A default error message", shortCircuit=true)}         
  )
      public string save() {
          //some code here ...
          return SUCCESS;
      }
  
      @Validations(
          visitorFields = {@VisitorFieldValidator(context="myContext2", fieldName="user", key="error.message", message="A default error message", shortCircuit=true)}         
  )
      public string update() {
          //some code here ...
          return SUCCESS;
      }
  
      //...
  }
  </code></pre>
  
  <p>Now I'd like to specify the context (myContext1 and myContext2) into the annotations inside the User object, so that some validators fire when the save() method is called on MyAction while others fire when update() is called.</p>
  
  <p>I imagine something like this:</p>
  
  <pre><code>public class User implements Serializable {
      private Integer id;
      private String name;
  
      @RequiredFieldValidator(context="myContext2", message = "You must enter a value for data.")
      public void setId(Integer id) {
          this.id=id;
      }
  
      @RequiredFieldValidator(context="myContext1", message = "You must enter a value for data.")
      public void setName(String name) {
          this.name = name;
      }
  
      //some code... getters, etc...
  }
  </code></pre>
  
  <p>I'd like to do this so that, for example, during creation operation (method save()) the name is required while during update operation (method update() ) the id is required. Unfortunately it seems to me that RequiredFieldValidator, so any other validator annotation in Struts2, does not support the "context" field.</p>
  
  <p>I know that I can use a User-myContext1-validation.xml, and a User-myContext2-validation.xml file (I've not tried but I think I've understood it can be done) but I'd like to use annotations only. </p>
  
  <p>Do you know How I can do this with annotations?</p>