I want to be able to use the built-in, annotation-based, unobtrusive client-side validation, but make my own ajax presentation form after I know that it passes.
Something like this jQuery bit:
$('#form').submit(function(e) {
e.preventDefault();
if (PassesUnobtrusiveValidation()) {
}
});
Is there an event PassedValidationor something like that (built into the standard, based on asp.net mvc 3 data-based validation based on data-based annotation) Can I connect (e.g. psuedocode in the example)?
I want to do this, so I can still use validation based on data annotation and then submit the form asynchronously as I want. I want to avoid writing a general check in the client, letting asp.net mvc 3 take care of this for me, and then submit the form as I want using$.ajax();
source
share