validation of form with Jquery within asp.net mvc4 application
- by slatnia wadii
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 ???