BUGFIX: Run validation on the final step.

This commit is contained in:
ajshort 2011-12-19 14:21:56 +11:00
parent 65d1681331
commit 4f1510ff5b

View File

@ -377,7 +377,13 @@ abstract class MultiForm extends Form {
Director::redirectBack(); Director::redirectBack();
return false; return false;
} }
if(!$this->getCurrentStep()->validateStep($data, $form)) {
Session::set("FormInfo.{$form->FormName()}.data", $form->getData());
Director::redirectBack();
return false;
}
// Save the form data for the current step // Save the form data for the current step
$this->save($data); $this->save($data);
} }