Project

General

Profile

Actions

Feature #93835

closed

Attribute validation errors to sub properties in custom validators

Added by Volker Diels-Grabsch over 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2021-03-30
Due date:
% Done:

100%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

For complex validators, it often makes sense that a custom validator can attribute an error to a specific property or sub property, even though it is validating a whole class.

This is already possible by accessing a validator's $this->result directly, but that is cumbersome and in no way obvious, as this requires deep knowledge of the Result and Error classes.

So there should be a convenience method "addErrorForProperty" similar to "addError" that takes a property path in addition to the error details (message, code, etc.).


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #93836: Typo in docstring of AbstractValidator::addError()Closed2021-03-30

Actions
Actions

Also available in: Atom PDF