I am using partial views and ajax based functionality to POST to my controller. I want to know how I can leverage the validation functionality I normally get with the MVC Razor forms and using a full page post back with a async based framework.
Pseudo Code
function buttonpress()
{
if(Validate())
.... Call server functionality with AJAX and handle result
else
.... Show standard validation messages as normal. Do not contact server
}
function Validate()
{
... Check the validation like it would with full post back
... Should also limit to a group too
}
I don't want to rewrite the all the free validation I get from the framework if I don't have to.