title: how to set form validation error message within its related text field
body: <p>I am implementing a form validation in spring-mvc. I have the same solution as discussed <a href="https://stackoverflow.com/questions/27955115/how-i-can-show-error-message-for-each-field-in-form">here</a> which is working fine. But I want to set the error message inside the field instead of beside the field, something like this.<a href="https://i.stack.imgur.com/HJMun.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HJMun.jpg" alt="enter image description here"></a></p>
  
  <p><strong>Form</strong></p>
  
  <pre><code>  &lt;form:form method="POST" action="/regStoreSuccessful" 
      commandName="storeForm"&gt;
      &lt;table&gt;
       &lt;tr&gt;
         &lt;td&gt;&lt;form:label path="name"&gt;Name store&lt;/form:label&gt;&lt;/td&gt;
         &lt;td&gt;&lt;form:input path="name" /&gt;&lt;/td&gt;
         &lt;td&gt;&lt;form:errors path="name" /&gt;&lt;/td&gt;
       &lt;/tr&gt;
       &lt;tr&gt;
         &lt;td&gt;&lt;form:label path="address"&gt;Address store&lt;/form:label&gt;&lt;/td&gt;
         &lt;td&gt;&lt;form:input path="address" /&gt;&lt;/td&gt;
         &lt;td&gt;&lt;form:errors path="address" /&gt;&lt;/td&gt;
       &lt;/tr&gt;
    &lt;/form:form&gt;
  </code></pre>