title: Short-circuit in Struts2 validation
body: <p>Let's assume that there a field of type <code>BigDecimal</code> in an action class as follows.</p>
  
  <pre><code>@Namespace("/admin_side")
  @ResultPath("/WEB-INF/content")
  @ParentPackage(value = "struts-default")
  public final class TestAction extends ActionSupport
  {
      private BigDecimal price;
  
      //Setter and getter.        
  
      @Validations(
      requiredFields = {
          @RequiredFieldValidator(fieldName = "price", type = ValidatorType.FIELD, message = "Price is mandatory.")},
      fieldExpressions = {
          @FieldExpressionValidator(fieldName = "price", expression = "price&gt;0", shortCircuit = true, message = "Price cannot be less than or equal to zero.")})
      @Action(value = "Add",
      results = {
          @Result(name = ActionSupport.SUCCESS, type = "redirectAction", params = {"namespace", "/admin_side", "actionName", "Test"}),
          @Result(name = ActionSupport.INPUT, location = "Test.jsp")},
      interceptorRefs = {
          @InterceptorRef(value = "defaultStack", params = {"params.acceptParamNames", "price", "validation.validateAnnotatedMethodOnly", "true"})
      })
      public String insert() {
          return ActionSupport.SUCCESS;
      }
  
      //This method is worth nothing. It is used just to return an initial view on page load.
      @Action(value = "Test",
      results = {
          @Result(name = ActionSupport.SUCCESS, location = "Test.jsp"),
          @Result(name = ActionSupport.INPUT, location = "Test.jsp")},
      interceptorRefs = {
          @InterceptorRef(value = "defaultStack", params = {"params.acceptParamNames", "", "params.excludeMethods", "load", "validation.validateAnnotatedMethodOnly", "true"})})
      public String load() throws Exception {
          return ActionSupport.SUCCESS;
      }
  }
  </code></pre>
  
  <p>And following is the form.</p>
  
  <pre><code>&lt;s:form namespace="/admin_side" action="Test" id="dataForm" name="dataForm"&gt;
      &lt;s:fielderror fieldName="price"/&gt;
      &lt;s:textfield id="price" name="price"/&gt;
  
      &lt;s:submit value="Submit" action="Add"/&gt;
  &lt;/s:form&gt;
  </code></pre>
  
  <p>I want to achieve,</p>
  
  <ol>
  <li>If the field is left blank then, the only message, <em>Price is mandatory.</em> should be displayed through <code>@RequiredFieldValidator</code></li>
  <li>If a non-numeric value like "abc" is entered then, it should only display the conversion error message from a property file.</li>
  <li>If a negative value is attempted then, the only message, <em>Price cannot be less than or equal to zero.</em> should appear through <code>@FieldExpressionValidator</code>.</li>
  </ol>
  
  <p>Either one conversion error or one validation error should appear at a time.</p>
  
  <p>Is this possible? I do by far not understand properly the function of the <code>shourtCircuit</code> attribute.</p>