symfony-docs icon indicating copy to clipboard operation
symfony-docs copied to clipboard

[Validator] Add `$groups` and `$payload` to `Compound` constructor

Open fabpot opened this issue 1 year ago • 2 comments

Q A
Feature PR symfony/symfony#58062
PR author(s) @derrabus
Merged in 7.2

We created this issue to not forget to document this new feature. We would really appreciate if you can help us with this task. If you are not sure how to do it, please ask us and we will help you.

To fix this issue, please create a PR against the 7.2 branch in the symfony-docs repository.

Thank you! :smiley:

fabpot avatar Aug 22 '24 13:08 fabpot

Can be closed:

Already in reference/constraints/Compound.rst

l.105 to l.110
Options
-------

.. include:: /reference/constraints/_groups-option.rst.inc

.. include:: /reference/constraints/_payload-option.rst.inc

thibaut22200 avatar Aug 27 '24 09:08 thibaut22200

Those are the options, not the constructor arguments. What's new is that those options can be set through names arguments. Maybe we should show on https://symfony.com/doc/current/reference/constraints/Compound.html a custom compound constraint used as an attribute with a validation group.

derrabus avatar Aug 27 '24 09:08 derrabus