Review main Merged

95890[FEATURE] Add ViewHelper f:form.hasErrors

Georg Ringer CR +2 V +2 Hard +268 −0 updated 09/24/26, 15:24

Commit message

Fluid could already read validation results through
f:form.validationResults, but only as a block: that ViewHelper
assigns a variable and renders its children, so it can not be
used inline inside an attribute.

On top of that, Result::hasErrors() is not reachable from a
template at all. Fluid resolves {results.errors} to getErrors(),
which is not recursive, so a check for "author" misses an error
that sits on "author.email".

The new condition ViewHelper evaluates hasErrors() and works
inline as well as with then/else. Its "for" argument is required
and must be a non-empty property path, so an unresolved variable
can not silently match the whole form.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oliver Klee +1
    • Torben Hansen +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oliver Klee +1
    • Torben Hansen +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 78

  1. Georg Ringer uploaded patch set 1 09/16/26, 19:58

  2. Georg Ringer commented on patch set 1 09/16/26, 20:00

    This change is ready for review.
  3. core-ci voted on patch set 1 V +1 09/16/26, 20:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108718

  4. Simon Schaufelberger voted on patch set 1 CR +1 V +1 09/17/26, 09:09

  5. Oliver Klee voted on patch set 1 CR +1 V +1 09/17/26, 11:25

  6. Torben Hansen voted on patch set 1 CR +1 V +1 09/18/26, 11:40

  7. Benni Mack commented on patch set 1 CR +2 V +2 09/24/26, 15:24

    that's indeed a nice feature, thanks
  8. Benni Mack merged patch set 2 09/24/26, 15:24