Feature #93835

Attribute validation errors to sub properties in custom validators

Added by Volker Diels-Grabsch 3 months ago. Updated 20 days ago.

Status:
Resolved
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

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

Actions
#1

Updated by Volker Diels-Grabsch 3 months ago

  • Related to Bug #93836: Typo in docstring of AbstractValidator::addError() added
#2

Updated by Gerrit Code Review 3 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68658

#3

Updated by Gerrit Code Review 3 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68658

#4

Updated by Gerrit Code Review 22 days ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68658

#5

Updated by Gerrit Code Review 22 days ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68658

#6

Updated by Gerrit Code Review 22 days ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68658

#7

Updated by Volker Diels-Grabsch 20 days ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF