Details
-
Story
-
Resolution: Unresolved
-
High
-
None
-
2.3.1
-
None
Description
It should be possible to set which content type(s) are valid for an embed attribute.
Example based on EE demo:
- places.contentId should only contain place_list items
- hero.image should only contain image items
The validator's configuration should be used to restrict the type(s) accepted by the UDW, and to validate the block.
Syntax suggestion
places: name: Places category: default thumbnail: '/bundles/ezplatformadminui/img/ez-icons.svg#places' views: default: { name: 'Default block layout', template: '@ezdesign/blocks/places.html.twig' } attributes: contentId: name: Places type: embed validators: not_blank: message: You must provide value regexp: options: pattern: '/[0-9]+/' content_type: options: type: place_list message: Choose a Place List item