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

@ -378,6 +378,12 @@ abstract class MultiForm extends Form {
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
$this->save($data);
}