Review main Merged

68658[FEATURE] Add AbstractValidator::addErrorForProperty()

Volker Diels-Grabsch CR +2 V +2 Normal +56 −0 updated 05/27/21, 19:30

Commit message

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 this commit adds a convenience method addErrorForProperty() similar
to addError() that takes a property path in addition to the error
details.

Review

  • Code review CR +2 Done
    • Anja Leichsenring +2
    • Oli Bartsch +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Anja Leichsenring +2
    • Oli Bartsch +1
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 2

Files 2

Review log 1118

  1. Volker Diels-Grabsch uploaded patch set 1 03/30/21, 21:19

  2. TYPO3com voted on patch set 1 V +1 03/30/21, 21:27 Completed build in 07m 38s on Tue, 30 Mar, 09:27 PM Test Summary: 33267 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10400

  3. Volker Diels-Grabsch updated the commit message in patch set 2 03/30/21, 21:29

  4. core-ci voted on patch set 1 V +1 03/30/21, 21:30 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1920

  5. TYPO3com voted on patch set 2 V +1 03/30/21, 21:36 Completed build in 07m 03s on Tue, 30 Mar, 09:36 PM Test Summary: 33267 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10401

  6. core-ci voted on patch set 2 V +1 03/30/21, 21:40 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1921

  7. Anja Leichsenring rebased onto patch set 3 05/25/21, 16:40

  8. core-ci voted on patch set 3 V +1 05/25/21, 16:50 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11840

  9. Oli Bartsch commented on patch set 3 05/25/21, 16:55

    Hi, thanks for your patch. Could you please add a Feature.rst, describing the new feature and how to use it? See https://docs.typo3.org/m/typo3/guide-contributionworkflow/master/en-us/AddingDocumentation/Index.html for more information about adding rst files.
  10. Anja Leichsenring uploaded patch set 4 05/25/21, 16:56

  11. Anja Leichsenring uploaded patch set 5 05/25/21, 16:56

  12. Anja Leichsenring commented on patch set 5 05/25/21, 16:58

    Reply

    just done :)
  13. core-ci commented on patch set 4 05/25/21, 17:06 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11841

  14. core-ci voted on patch set 5 V +1 05/25/21, 17:08 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11842

  15. Christian Kuhn voted on patch set 5 V +1 CR +1 05/27/21, 19:24

  16. Oli Bartsch voted on patch set 5 V +1 CR +1 05/27/21, 19:30

  17. Anja Leichsenring voted on patch set 5 V +2 CR +2 05/27/21, 19:30

  18. Anja Leichsenring merged patch set 6 05/27/21, 19:30