diff --git a/content/createArticle.php b/content/createArticle.php index c52fb80..970186c 100644 --- a/content/createArticle.php +++ b/content/createArticle.php @@ -25,7 +25,7 @@ session_start();
diff --git a/php/controller/createArticle-controller.php b/php/controller/createArticle-controller.php index a4c0fa2..10916fb 100644 --- a/php/controller/createArticle-controller.php +++ b/php/controller/createArticle-controller.php @@ -13,7 +13,7 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") { header("location: ../../index.php?pfad=createArticle"); exit(); } else { - // ------------------------ Validierung des Authors: ---------------------------- + // ------------------------ Validierung des Autors: ---------------------------- $author = "max.mustermann"; // TODO: später aus Session den angemeldeten Nutzer beziehen. $validatedAuthor = $author; echo "Autorvalidierung erfolgreich"; @@ -37,7 +37,7 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") { // --------------------- Eingabeüberprüfung des Contents: ----------------------- $content = $_POST["content"]; $zeichenAnzahl = mb_strlen($content); - if ($zeichenAnzahl <= 7000) { + if ($zeichenAnzahl <= 7000 && $zeichenAnzahl > 10) { $validatedContent = $content; }else{ $_SESSION["message"] = "invalid_content";