validation of form with Jquery within asp.net mvc4 application

Posted by slatnia wadii on Stack Overflow See other posts from Stack Overflow or by slatnia wadii
Published on 2013-10-25T15:21:27Z Indexed on 2013/10/25 15:54 UTC
Read the original article Hit count: 243

I am a beginner with Jquery and asp MVC4 I use the Jquery validate plugin

 <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.10.0/jquery.validate.js" type="text/javascript">

the code

<script>
      jQuery(document).ready(function() {
          jQuery("#monFormulaire").validate({
              rules: {
                  "reclamation": {
                      "required": true,
                      "minlength": 4,
                      "maxlength": 60000
                  },
                  "cause": {
                      "required": true,
                      "minlength": 4,
                      "maxlength": 60000
                  },

                  "curative": {
                      "required": true,
                      "minlength": 4,
                      "maxlength": 60000
                  },

                  "Closing_date": {
                      "required": true,
                      "minlength": 1,
                      "maxlength": 60000
                  }
              },
              submitHandler: function (form) { /* envoyer Mail*/
                  mailJob();
              }
          });
      });

        <button type="submit" value="Page5" name="btnPage1" style="margin-left:1%" class="backRow" ></button>

  <table border="1"  class="mytab" style="margin: auto;">
      formulaire .
 </table>

</form>

The validation runs in the right way but the Action in the server side is not invoked anyone have any Idea ???

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery