Skip to content

Commit

Permalink
[BUGFIX] Respect unique form identifier for validators
Browse files Browse the repository at this point in the history
Make sure to apply all configured validators if a form is used multiple
times on the same page.

Resolves: #88730
Releases: master, 9.5
Change-Id: Id2fd63fd83cd2ff657f5bbc3b427147adfd8ab38
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62398
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Björn Jacob <bjoern.jacob@tritum.de>
Tested-by: Ralf Zimmermann <ralf.zimmermann@tritum.de>
Reviewed-by: Björn Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Ralf Zimmermann <ralf.zimmermann@tritum.de>
  • Loading branch information
mbrodala authored and waldhacker1 committed Nov 23, 2019
1 parent 33a011f commit 235ef32
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -168,7 +168,11 @@ public function setOptions(array $options, bool $resetValidators = false)
}

foreach ($options['validators'] as $validatorConfiguration) {
$configurationHash = md5($this->getIdentifier() . json_encode($validatorConfiguration));
$configurationHash = md5(
$this->getRootForm()->getIdentifier() .
$this->getIdentifier() .
json_encode($validatorConfiguration)
);
if (in_array($configurationHash, $configurationHashes)) {
continue;
}
Expand Down

0 comments on commit 235ef32

Please sign in to comment.