ASP.NET MVC Jquery Validation Returns True Always -


why when forms show validation has not passed, return value following code still returns true. forms indicating validated fields in error code below adds wait no matter because valid method returns true.

$(document).ready(function () {         $("input[type=submit]").click(function () {             if ($("input[type=submit]").valid() == true || $(this).attr("name") == "savedraft")                 {                   $("*").css("cursor", "wait");                  }         });     }); 

this basic unobtrusive validation built .net.

i had reference element directly instead of how doing it.

$("#mysubmitbutton").

instead of $("input[type=submit]").


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -