Issue Bug Under Review Quiet Regression

#110053Validators of form element variants are not executed and mess up the stepType value when rendering them conditionally!

S P 06/12/26, 09:35 updated 09/25/26, 06:33

Description

I think this is a follow up of #101455, that’s why I marked the issue as regression. But, maybe it’s also rather something due to #108704 or #108390.

I have a custom Form element with this rendering condition:

validators:
    - identifier: MyValidator
renderingOptions:
    enabled: false
variants:
    - identifier: showOnlyOnPages
      renderingOptions:
          enabled: true
      condition: 'stepType == "Page"'

This works up to the point that the element is actually only rendered on form pages, but not in finishers and not on summary pages. So the referenced issues is somehow solved.

But now a new bug seems to be present: as soon as there are validators, these validators are never executed in the conditional variants! If I drop the variants definition, the validators are executed. But then the element is also shown and “validated” also in finishers and summary pages, of course. Which is not desired, that’s why I have the conditions.

I think there’s also some kind of “off-by-one” error involved when having these conditonal variants. If I invert the conditions, like this:

validators:
    - identifier: MyValidator
renderingOptions:
    enabled: true
variants:
    - identifier: showOnlyOnPages
      renderingOptions:
          enabled: false
      condition: 'stepType != "Page"'

The Element is then NOT rendered on regular form pages. If I debug-dump the step type in this case, it is empty (empty string) – which is the reason why it is like this (because obvisouly ("" !== "Page") = true@). I think it should never-ever happen that a @stepType@ is empty. Additionally, the Element is then rendered on the summary page (if I dump there I get @stepType "Page"! totally wrong).

Somehow the variants are totally messing up the stepType and validator evaluation (or evaluation order).

I did not find a suitable workaround as of now.

Reviews 2

History 39