diff --git a/lib/validation.php b/lib/validation.php index e405b7c..fdcb51c 100644 --- a/lib/validation.php +++ b/lib/validation.php @@ -80,7 +80,7 @@ function validateData(&$data, $parameters){ break; } - if(is_null($data[$name])) { + if(is_null($data[$name]) && isset($set[$name]['required']) && $set[$name]['required']) { echo 'Parameter \'' . $name . '\' is invalid!' . PHP_EOL; return false; }