Version: 3.2.3
Bug Description
When errors added to a form or a control are instances of Nette\HtmlStringable they cummulate.
Steps To Reproduce
$form = newUI\Form;
$form->addError(Nette\Utils\Html::fromHtml('1'));
$form->addError(Nette\Utils\Html::fromHtml('2'));
$renderer = $form->getRenderer();
assert($rendererinstanceof \Nette\Forms\Rendering\DefaultFormRenderer);
print$renderer->render($form);renders the second error twice:
<formaction="" method="post"><ulclass="error"><li>
1
</li><li>
1
2
</li></ul></form>
Possible Solution
It seems to be the problem of clonning and addHtml() in DefaultFormRenderer/doRenderErrors().
Version: 3.2.3
Bug Description
When errors added to a form or a control are instances of Nette\HtmlStringable they cummulate.
Steps To Reproduce
renders the second error twice:
Possible Solution
It seems to be the problem of clonning and addHtml() in DefaultFormRenderer/doRenderErrors().