diff --git a/src/Parameters.php b/src/Parameters.php index 4993564..33cafa8 100644 --- a/src/Parameters.php +++ b/src/Parameters.php @@ -40,8 +40,13 @@ public function post($key = NULL, $isRequired = FALSE, array $validators = array $return = isset($post[$key]) ? $post[$key] : null; else $return = $post; - } else - $return = $this->request->getPost($key); + } else { + if($key) + $return = $this->request->getPost($key); + else + $return = $this->request->getPost(); + } + $return = $this->validator->validate($key, $isRequired, $validators, $return); return $return; }