By bbrala on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
11.2.x
Introduced in version:
11.2.0
Issue links:
Description:
It is now possible to use a AtLeastOneOf constraints. This allows for validation of multiple constraints of which one should validate.
This allows for constraints like:
constraints:
AtLeastOneOf:
constraints:
- PluginExists:
manager: plugin.manager.menu.link
interface: 'Drupal\Core\Menu\MenuLinkInterface'
- IdenticalTo:
value: ''
Which then does validation on both, but only fails if no validation succeeds.
Impacts:
Module developers
Site templates, recipes and distribution developers