diff --git a/code/Control/UserDefinedFormController.php b/code/Control/UserDefinedFormController.php index d4001ed..5dc5de3 100644 --- a/code/Control/UserDefinedFormController.php +++ b/code/Control/UserDefinedFormController.php @@ -252,7 +252,9 @@ JS $upload->loadIntoFile($_FILES[$field->Name], $file, $foldername); } catch (ValidationException $e) { $validationResult = $e->getResult(); - $form->addErrorMessage($field->Name, $validationResult->message(), 'bad'); + foreach ($validationResult->getMessages() as $message) { + $form->sessionMessage($message['message'], ValidationResult::TYPE_ERROR); + } Controller::curr()->redirectBack(); return; }