title: Why do we need to put BindingResult immediate after ModelAttribute in spring
body: <p>From org.springframework.web.method.annotation.ModelAttributeMethodProcessor</p>
  
  <pre><code>/**
   * Whether to raise a {@link BindException} on validation errors.
   * @param binder the data binder used to perform data binding
   * @param parameter the method argument
   * @return {@code true} if the next method argument is not of type {@link Errors}.
   */
  protected boolean isBindExceptionRequired(WebDataBinder binder, MethodParameter parameter) {
      int i = parameter.getParameterIndex();
      Class&lt;?&gt;[] paramTypes = parameter.getMethod().getParameterTypes();
      boolean hasBindingResult = (paramTypes.length &gt; (i + 1) &amp;&amp; Errors.class.isAssignableFrom(paramTypes[i + 1]));
  
      return !hasBindingResult;
  }
  </code></pre>
  
  <p>From the code above we get the idea that while processing handler method argument spring raises Exception if the Error parameter is not immediate after the Model Attribute. Please share your thoughts and ideas.</p>
  
  <p>Thanks in advance.</p>