title: SpringForm with Jquery Validation not working
body: <p>i am trying to validate a spring mvc form having spring tags with Jquery but this validation isn't working,need urgent help. The following JS files are being used.</p>
  
  <p>On inspection i am able to see that the values are getting passed by the element id's but the validation and the error messages are not
      working. Please help as i am not very well versed with Jquery. Your help would be much appreciated.      </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function submitForm()
      {
          $("#savelogin").validate({      
              rules:
              { 
                  UName: 
                  {
                      required: true,
                      minlength: 6,
                      maxlength: 40
                  },
                  pwd:
                  { 
                      equired: true,
                      minlength: 6,
                      maxlength: 40
                  }
              },
              messages:
              {
                  UName:
                  {
                      required: "username is required!",
                      minlength: "username must be at least 6 characters long"
                  },
                  pwd:
                  {
                      required: "Please enter a password",
                      minlength: "Password must be at least 6 characters long"
                  }
              },
              submitHandler: function(form)
              {
                  form.submit();
              }
          });  
      }
  &lt;/script&gt; 
  
  &lt;title&gt;Login Page&lt;/title&gt;
  &lt;/head&gt;
      &lt;body&gt;
      &lt;form:form commandName="userLogin" id="savelogin"&gt;
          &lt;fieldset&gt;
              &lt;c:url value="/Registration.do" var="url"/&gt;
              &lt;a href="&lt;c:out value='${url}'/&gt;"&gt;New User:Register&lt;/a&gt;
              &lt;div&gt;
                  &lt;form:label path="userRegistration.userName" &gt;&lt;spring:message code="label.username"/&gt;   &lt;/form:label&gt;
                  &lt;form:input path ="userRegistration.userName" autocomplete="on" id="UName" /&gt;
                  &lt;form:errors path="userRegistration.userName"&gt;&lt;/form:errors&gt; 
              &lt;/div&gt;
              &lt;div&gt;
                  &lt;form:label path="userRegistration.password"&gt;&lt;spring:message code="label.password"/&gt;&lt;/form:label&gt;
                  &lt;form:password path="userRegistration.password"   id="pwd"/&gt;
                  &lt;form:errors path="userRegistration.password"&gt;&lt;/form:errors&gt;
              &lt;/div&gt;
  
              &lt;div&gt;      
                  &lt;input type="submit" value="&lt;spring:message code="label.login"/&gt;" name="loginUser" id="submit" onclick="submitForm();"/&gt;
              &lt;/div&gt;
          &lt;/fieldset&gt;
      &lt;/form:form&gt;
  &lt;/body&gt;
  </code></pre>
  
  <hr>
  
  <pre><code>   $(document).ready(function(){ 
  
      $("#savelogin").validate({      
         rules:
         { 
            UName: 
           {
               required: true,
               minlength: 6,
               maxlength: 40
           },
           pwd:
           { 
               equired: true,
               minlength: 6,
               maxlength: 40
           }
       },
       messages:
       {
           UName:
           {
               required: "username is required!",
               minlength: "username must be at least 6 characters long"
           },
           pwd:
           {
               required: "Please enter a password",
               minlength: "Password must be at least 6 characters long"
           }
       },
       submitHandler: function(form)
       {
           form.submit();
       }
   });  
  </code></pre>
  
  <p>});</p>
  
  <p> </p>
  
  <p>I tried with this but nothing happened. Please check and help.</p>