diff --git a/Classes/Controller/ModuleController.php b/Classes/Controller/ModuleController.php
index a82b020..ccdcc7a 100644
--- a/Classes/Controller/ModuleController.php
+++ b/Classes/Controller/ModuleController.php
@@ -582,17 +582,30 @@ protected function deleteRedirect(string $sourceUriPath, ?string $host = null):
protected function validateRedirectAttributes(?string $host, string $sourceUriPath, string $targetUriPath): bool
{
+ $valid = true;
+
if ($sourceUriPath === $targetUriPath) {
- $this->addFlashMessage('', $this->translateById('error.sameSourceAndTarget'),
- Message::SEVERITY_WARNING);
- } elseif (!preg_match($this->validationOptions['sourceUriPath'], $sourceUriPath)) {
- $this->addFlashMessage('',
- $this->translateById('error.sourceUriPathNotValid', [$this->validationOptions['sourceUriPath']]),
- Message::SEVERITY_WARNING);
- } else {
- return true;
+ $valid = false;
+ $errorMessages[] = $this->translateById('error.sameSourceAndTarget');
+ }
+ if (isset($this->validationOptions['host']) && !preg_match($this->validationOptions['host'], $host)) {
+ $valid = false;
+ $errorMessages[] = $this->translateById('error.hostNotValid');
+ }
+ if (isset($this->validationOptions['sourceUriPath']) && !preg_match($this->validationOptions['sourceUriPath'], $sourceUriPath)) {
+ $valid = false;
+ $errorMessages[] = $this->translateById('error.sourceUriPathNotValid', [$this->validationOptions['sourceUriPath']]);
}
- return false;
+ if (isset($this->validationOptions['targetUriPath']) && !preg_match($this->validationOptions['targetUriPath'], $targetUriPath)) {
+ $valid = false;
+ $errorMessages[] = $this->translateById('error.targetUriPathNotValid', [$this->validationOptions['targetUriPath']]);
+ }
+
+ if (!$valid) {
+ $this->addFlashMessage('', implode('
', $errorMessages), Message::SEVERITY_WARNING);
+ }
+
+ return $valid;
}
protected function isSame(
diff --git a/Resources/Private/Translations/de/Modules.xlf b/Resources/Private/Translations/de/Modules.xlf
index 5e1db4b..838f42d 100644
--- a/Resources/Private/Translations/de/Modules.xlf
+++ b/Resources/Private/Translations/de/Modules.xlf
@@ -163,6 +163,14 @@
Der Quellpfad entspricht nicht dem Muster {0}
+
+
+ Der Zielpfad entspricht nicht dem Muster {0}
+
+
+
+ Der Host entspricht nicht dem Muster {0}
+
Ursprungsdomäne
diff --git a/Resources/Private/Translations/en/Modules.xlf b/Resources/Private/Translations/en/Modules.xlf
index 97ef11a..b8b2f25 100644
--- a/Resources/Private/Translations/en/Modules.xlf
+++ b/Resources/Private/Translations/en/Modules.xlf
@@ -128,6 +128,12 @@
+
+
+
+
+
+