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
Post a Comment