diff --git a/src/TypedData/PatternDataDefinition.php b/src/TypedData/PatternDataDefinition.php index a0e89b90204b5eced39471f53af9bf98b5d9f280..93f17892d40e35bbd1a7b9fdc88185694c5b86f0 100644 --- a/src/TypedData/PatternDataDefinition.php +++ b/src/TypedData/PatternDataDefinition.php @@ -42,7 +42,7 @@ class PatternDataDefinition extends MapDataDefinition { ->setPropertyDefinition('base path', DataDefinition::create('string')->setRequired(TRUE)) ->setPropertyDefinition('file name', DataDefinition::create('string')->setRequired(TRUE)) ->setPropertyDefinition('provider', DataDefinition::create('string')->setRequired(TRUE)) - ->setPropertyDefinition('fields', $this->getFieldsDefinition()->setRequired(TRUE)) + ->setPropertyDefinition('fields', $this->getFieldsDefinition()) ->setPropertyDefinition('theme hook', DataDefinition::create('string')->setRequired(TRUE)) ->setPropertyDefinition('description', DataDefinition::create('string')) ->setPropertyDefinition('use', DataDefinition::create('string')) diff --git a/tests/features/overview.feature b/tests/features/overview.feature index 3f5a74ac01eb45f8bca4c9f3cf1f20cc971f02b5..fd4354f3fac5251c9e99ca913a3da3a71f0c7a43 100644 --- a/tests/features/overview.feature +++ b/tests/features/overview.feature @@ -81,11 +81,9 @@ Feature: Overview | error messages | | Pattern 'bad_pattern' is skipped because of the following validation error(s): | | Validation error on "bad_pattern.label": This value should not be null. | - | Validation error on "bad_pattern.fields": This value should not be null. | And I reload the page Then I should not see the following error messages: | error messages | | Pattern 'bad_pattern' is skipped because of the following validation error(s): | | Validation error on "bad_pattern.label": This value should not be null. | - | Validation error on "bad_pattern.fields": This value should not be null. | diff --git a/tests/src/fixtures/validation.yml b/tests/src/fixtures/validation.yml index 4ae35e26d8ca9769d2fc95fd4e0533bcedfe0392..8507a14c47251869e11ec89ae29729f40fac6bb7 100644 --- a/tests/src/fixtures/validation.yml +++ b/tests/src/fixtures/validation.yml @@ -7,7 +7,6 @@ - "base path: This value should not be null." - "file name: This value should not be null." - "provider: This value should not be null." - - "fields: This value should not be null." - "theme hook: This value should not be null." - pattern: @@ -18,7 +17,6 @@ - "base path: This value should not be null." - "file name: This value should not be null." - "provider: This value should not be null." - - "fields: This value should not be null." - "theme hook: This value should not be null." - pattern: @@ -26,12 +24,14 @@ label: label description: description fields: - not valid name: + fass: + name: 'not valid name' messages: - "base path: This value should not be null." - "file name: This value should not be null." - "provider: This value should not be null." - - "fields: This value should not be null." + - "fields.0.name: This value is not valid." + - "fields.0.label: This value should not be null." - "theme hook: This value should not be null." - pattern: