title: validation in struts2
body: <pre><code>public class Admin extends ActionSupport implements ModelDriven&lt;AdminData&gt;
    {
     AdminData adminData = new AdminData();
     public AdminData getModel()
       {
          return adminData;
      }
  
  
     @Validations(requiredStrings ={
        @RequiredStringValidator(type=ValidatorType.FIELD,fieldName="emailId"),
      @RequiredStringValidator(type=ValidatorType.FIELD,fieldName="password")}
      public String auth()
      {
       }
  
  
       @Validations(requiredStrings ={
       @RequiredStringValidator(type=ValidatorType.FIELD,fieldName="emailId"),
          @RequiredStringValidator(type=ValidatorType.FIELD,fieldName="firstName"),
          @RequiredStringValidator(type=ValidatorType.FIELD,fieldName="surName"),
          @RequiredStringValidator(type=ValidatorType.FIELD,fieldName="password")}
     public String create() throws DatabaseException
     {
  
      }
  
  }
  </code></pre>
  
  <p>my problem is that when i call <code>create()</code> method there is no problem in validation, but when i call <code>auth()</code> method there is problem with validation because when i call auth method it is goes for validation of firstname and surname.</p>
  
  <p>and there is all getset in AdminData.java</p>