Is there a function for ASP.NET MVC 2 built in data annotation javascript validation that performs the functionality of Jquery.Validate’s isValid()?
I’d like to check if my fields are valid prior to using jquery ajax to send data to the server? Any suggestions?
Thank You.
As basilmir and Dom Ribaut implies you should get this automatically if you EnableClientValidation(). However if you want to manually call client side MVC validation you can use:
You can replace
$("#myform").get(0)with the DOM element for your form.