diff --git a/src/Method/FormContext.php b/src/Method/FormContext.php index 6f1ca19..9fb3f75 100644 --- a/src/Method/FormContext.php +++ b/src/Method/FormContext.php @@ -51,6 +51,8 @@ class FormContext implements FormContextInterface } } + $this->fillValues(); + $this->files = $request->getUploadedFiles() ?: []; } @@ -142,4 +144,13 @@ class FormContext implements FormContextInterface { $this->messages[] = $message; } + + protected function fillValues() : void + { + foreach($this->values as $property => $value) { + if (property_exists($this, $property)) { + $this->$property = $value; + } + } + } } \ No newline at end of file