Active
Project:
Drupal core
Version:
main
Component:
other
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Apr 2025 at 14:13 UTC
Updated:
24 Nov 2025 at 19:21 UTC
Jump to comment: Most recent
In #3461720: Create AtLeastOneOf constraint we created support for the first composite Symfony constraint. It was suggested to see if we can support all of them to make our life's easier. This meta is to manage those issues.
The classes are all in the namespace of Symfony\Component\Validator\Constraints:
Some seem already in use in Drupal\Core\Recipe\Recipe. Lets investigate what we can actually support using AtLeastOneOf as a template or if there is a better way with less code, do that.
Comments
Comment #2
bbralaComment #3
wim leersThanks @bbrala for pointing me here from #3461720-26: Create AtLeastOneOf constraint!
Sequentiallyis the one that I've definitely wished I had access to in Drupal a hundred times now. It'd allow many validation errors to be much more helpful; and not show errors that are almost pure noise when an earlier simpler validation constraint was violated. See https://symfony.com/doc/current/reference/constraints/Sequentially.htmlComment #4
bbralaLet's use that as direction and see if we can do that. Creating a child issue.
Comment #5
bbralaWhat the... with a little change in our validator we would be able to use these easily? What am i missing....
#3521131: Add support for Sequentially constraint
Comment #6
bbralaComment #7
bbralaNext one we do should also add the logic in the create method to a trait to deduplocate.
Comment #8
alexpotthttps://www.drupal.org/node/3558181 if we do this the classes get even thinner.
Comment #9
bbralaComment #10
bbrala