CActiveForm, ajaxSubmitButton and displaying errors

I have a model where one part of the validation is an extensive test that can take up to a minute in some cases. In light of that I want the view that changes the model to use ajax to submit the form so that the user isn’t just looking at “Loading …” in the status bar while the tests are run. Also, I don’t want to do the validation every time the user tabs between fields for obvious reasons, so I have ‘validateOnSubmit’=>true and ‘validateOnChange’=>false in the CActiveForm widget.

I’ve managed to get the form to post with ajax, but I can’t get errorSummary to display. In Firebug I see the Ajax function call is returning:

{"YHost_address2":["IP address incorrect"]}

but no error is displayed. If I don’t use Ajax the errorSummary is displayed correctly.

The extensive tests are being called from the models afterValidate() function.

I could really use any help I can find in getting the errors from the ajax submit to be displayed, or maybe another way of dealing with forms with very long tests.

Is this also an issue if you skip the time consuming parts of the extensive tests, i.e. everything is working in case of quick validation?