title: Spring MVC Form validation error message
body: <p>I have the following form: </p>
  
  <pre><code>&lt;form:form method="POST" action="signin.dlp" commandName="user" &gt;
  &lt;form:input path="useremail" id="useremail" /&gt;&lt;FONT color="red"&gt;&lt;form:errors path="useremail" /&gt;&lt;/FONT&gt;&lt;Br /&gt;
  &lt;form:password path="pswd" id="pswd" /&gt;&lt;FONT color="red"&gt;&lt;form:errors path="pswd" /&gt;&lt;/FONT&gt; &lt;br /&gt;
  &lt;input id ="login" type="submit" value="Login"&gt;&lt;/input&gt;                                 
  &lt;/form:form&gt;
  </code></pre>
  
  <p>and then I i have Validator which validates value from and send error. </p>
  
  <p>what I would like to do is to add extra error label, for example </p>
  
  <pre><code>&lt;form:errors path="generarError" /&gt;
  </code></pre>
  
  <p>and inside my validator I can do the following: </p>
  
  <pre><code>if (user.getA().equals(user.getB()))
   errors.rejectValue("generarError",
                  "lengthOfUser.user.generarError",
                  "A is not equeal to B. Sorry");
            }
  </code></pre>
  
  <p>The important thing that I generalError is not member of user object.</p>
  
  <p>How can I do that? </p>