When a form is posted in my controller, I make the following check:
if(ModelState.IsValid)
If the model is not valid, errors are added to the <
You could spit global javascript variable:
and then:
$(function() { if (!isValid) { alert('opa'); } });