title: How to check whether an error happened on a specific property with spring mvc
body: <p>I'm using the form tag. </p>
  
  <pre><code>&lt;form:form commandName="foo"&gt;
      &lt;div class="myclass  "&gt;
          &lt;label&gt;Foo&lt;/label&gt;
              &lt;form:input path="fooName"/&gt;
      &lt;/div&gt;
          &lt;div class="controls"&gt;
              &lt;input type="submit" class="btn" value="Submit"/&gt;
          &lt;/div&gt;
  &lt;/form:form&gt;
  </code></pre>
  
  <p><strong>Question</strong></p>
  
  <p>Is there a way to find out if an error happened on a specific field? </p>
  
  <p>I am aware of the <code>&lt;form:erros path="fooName"/&gt;</code> but this will print out the error message. I am after something that simply returns true or false based on if the error happened on <code>fooName</code> property. I need this because if the error happened then I can insert the css class <code>error</code> next to <code>my class</code></p>