I currently have a form that is being displayed to the user via a custom route.
The form submits to a controller. The first thing the controller does is populate a custom model and validates it.
If the model fails validation, I want to skip the rest of the controller and pass the model back to the form. What is the best way to do this? I tried using
craft()->urlManager->setRouteVariables and a
$this->redirect, but the route variable didn't seem to come through, which I imagine is because
setRouteVariables isn't supposed to be used like that.