Skip to content
Snippets Groups Projects

Issue #3456024 Tree validation

Compare and
15 files
+ 521
70
Compare changes
  • Side-by-side
  • Inline

Files

@@ -78,10 +78,14 @@ experience_builder.component.*:
# @todo Add `StructuredDataPropExpression` validation constraint that fails if StructuredDataPropExpression::fromString() fails
# StructuredDataPropExpression: [field_type]
# @todo reuse the yet-to-be-written validation logic that \Drupal\experience_builder\Plugin\Field\FieldType\ComponentTreeItem::preSave() is referring to
field.value.component_tree:
type: field.value.*
label: 'Default value'
# The config equivalent of a ComponentTreeItem, validated by the same constraint.
# @todo Use this in https://www.drupal.org/project/experience_builder/issues/3455629
experience_builder.component_tree:
type: mapping
label: 'Config-Defined Component Tree'
constraints:
ValidComponentTree: ~
FullyValidatable: ~
# @see \Drupal\experience_builder\Plugin\Field\FieldType\ComponentTreeItem::propertyDefinitions()
mapping:
# @see \Drupal\experience_builder\Plugin\DataType\ComponentTreeStructure
@@ -93,6 +97,12 @@ field.value.component_tree:
type: string
label: 'Prop values for each component in the component tree'
field.value.component_tree:
type: experience_builder.component_tree
label: 'Default value'
constraints:
FullyValidatable: ~
field.field_settings.component_tree:
type: field.field_settings.*
constraints:
Loading