Skip to content
Snippets Groups Projects
Commit 4b97af5e authored by Antonio De Marco's avatar Antonio De Marco
Browse files

Issue #181: Make fields not required anymore.

parent b307d220
No related branches found
No related tags found
No related merge requests found
......@@ -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'))
......
......@@ -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. |
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment