- Added context validation status

This commit is contained in:
Dave Mc Nicoll 2022-06-27 17:29:16 +00:00
parent ceebc6783a
commit 164a27d267
1 changed files with 3 additions and 1 deletions

View File

@ -14,6 +14,8 @@ class FormHandler {
public bool $validateCsrfToken = true;
public ? bool $executionStatus = null;
public ? bool $validationStatus = null;
public FormContext $context;
@ -46,7 +48,7 @@ class FormHandler {
$this->form->initialize($this->context);
if ( $this->sent && $this->context->formSent() ) {
if ( $this->form->validate($this->context) ) {
if ( $this->validationStatus = $this->form->validate($this->context) ) {
$this->executionStatus = $this->form->execute($this->context);
}
}