diff --git a/WEB/Config/Validation.php b/WEB/Config/Validation.php index 45cb01cd..d5896884 100644 --- a/WEB/Config/Validation.php +++ b/WEB/Config/Validation.php @@ -44,4 +44,9 @@ class Validation } return true; } + public function ValidateEnigme(string $name,string $statement,string $help,string $reminder,string $example,string $solution,string $test, string $resolutionTime, int $points) : bool{ + if(strlen($name)>50 || strlen($statement) > 250 || strlen($help) > 250 || strlen($reminder) > 250 || strlen($example) > 250 || strlen($solution) > 250 || strlen($test) > 250 || $resolutionTime < 0 || $points < 0) + return false; + return true; + } }