asp.net - How to conditionally disable client side validation in xVal? -


I am using xVal in an asp.net MVC project. One form has two buttons and when a button is clicked I want to disable client side recognition. Is there any way to conditionally disable client side recognition in xVal?

Instead of disabling client-side verification. We can execute the rules only when we need it with the help of JQuery valid method. For example: Click the button on the event at which the validation rules are removed ... Apply jquery form verification ...

  $ ("# ButtonID "). Click on // var validDate = validateDate (f); var validForm = valid.validate () .form (); / var valid = $ ("# formid.id"); // to enter form ID. Set the delay for / 500ms so that all Ajax assumptions can be completed.SetTimeout (function () {$ ("#FormID"). Valid () .form ();}, 500); // Form ID ValidForm = valid.validate (.) Form (); if (valid form) {// posted form data on server}});  

Comments