Skip to content
Snippets Groups Projects
Commit 26c8359e authored by Ralf Zimmermann's avatar Ralf Zimmermann Committed by Wouter Wolters
Browse files

[BUGFIX] EXT:form - mandatoryValidationMessages unset after submit

Build the validation rules within the initializeShowAction

Resolves: #73218
Releases: master, 7.6
Change-Id: I1b441db52da57b8db6a574f87a1600b5332154df
Reviewed-on: https://review.typo3.org/48584


Reviewed-by: default avatarBjoern Jacob <bjoern.jacob@tritum.de>
Tested-by: default avatarBjoern Jacob <bjoern.jacob@tritum.de>
Reviewed-by: default avatarRuud Silvrants <ruudsilvrants@gmail.com>
Tested-by: default avatarRuud Silvrants <ruudsilvrants@gmail.com>
Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
parent edddac45
Branches
Tags
No related merge requests found
......@@ -120,16 +120,11 @@ class FrontendController extends ActionController
*/
protected function initializeShowAction()
{
// set validation errors
$validationResults = $this->request->getOriginalRequestMappingResults()->forProperty('model');
if (!$validationResults->hasErrors()) {
// If there are errors, the rules already build
// but if there are errors, we need to build the rules here,
// because of the mandatory message rendering
$this->validationBuilder->buildRules();
return;
$this->validationBuilder->buildRules();
if ($validationResults->hasErrors()) {
$this->formBuilder->setValidationErrors($validationResults);
}
$this->formBuilder->setValidationErrors($validationResults);
}
/**
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment