Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.

Review main Work in progress Stale

95638[TASK] Extend FieldValidationService to more TCA field types

Andreas Nedbal CR 0 V 0 Expert +1000 −180 updated 09/04/26, 11:42

Commit message

Applies the FieldValidationService pattern introduced for the "input"
TCA type to six more self-contained types: color, number, json, uuid,
datetime and email. DataHandler::checkValueFor{Color,Number,Json,Uuid,
Datetime,Email}() now delegate to a matching FieldTypeValidatorInterface
implementation instead of validating inline.

A private DataHandler::validateFieldValue() helper removes the
request-building boilerplate five of these six share (color, number,
json, uuid, datetime); email needs the full FieldValidationResult
afterwards for its own log() call, so it builds its request directly.

No Services.yaml or Services.php changes are needed: the generic
for "input" picks up these six new validators automatically.

email's invalid, non-empty value is not rejected by the original
method - it is sanitized to an empty string while the record is
still written, and merely logged. FieldValidationResult gains a
validWithErrors() named constructor to express this: a *valid*
result whose errors() still carry the reason, letting DataHandler
decide to log it without dropping the field.

No behavior change: existing DataHandler unit and functional test
suites pass unmodified, including the flexform-nested "number" case
exercised by DataHandlerTest::checkFlexFormData().

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 2
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/38/95638/2 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/38/95638/2 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Relation chain 3

  1. main 95639[TASK] Extract a read-only UniquenessChecker from DataHandler Based on this change Work in progress Merge conflict Andreas Nedbal CR 0 V -1 Hard +339 −56
  2. 95638 [TASK] Extend FieldValidationService to more TCA field types This change

  3. main 95637[TASK] Introduce FieldValidationService for TCA field validation This change is based on it Work in progress Merge conflict Andreas Nedbal CR 0 V 0 Hard +738 −94

Files 15

Review log 24

  1. Andreas Nedbal uploaded patch set 1 09/04/26, 10:05

  2. core-ci voted on patch set 1 V -1 09/04/26, 10:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107853

  3. Andreas Nedbal rebased onto patch set 2 V -1 09/04/26, 11:28

  4. core-ci voted on patch set 2 V +1 09/04/26, 11:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107858