I have a SiteController::actionIndex() that renders some forms, each one ideally submitting to different actions in different controllers. My question is: is it possible to, in case of validation errors, go back to site/index and render the form with the model errors as usual?
I assume that model A is being manipulated directly in the actionIndex() you’ve mentioned, instantiated as $objA. Lets assume you’d like to show model B validation errors. To be more precise, to show $objB errors, which is of type modelB.
In that case, in actionIndex() you do:
$objA->addErrors($objB->getErrors());
This way, also assuming that you use CActiveForm in the view file rendered by actionIndex(), you’ll get the error messages of objA and objB concatenated together.