Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ui_patterns
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
ui_patterns
Commits
4b97af5e
Commit
4b97af5e
authored
7 years ago
by
Antonio De Marco
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#181
: Make fields not required anymore.
parent
b307d220
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/TypedData/PatternDataDefinition.php
+1
-1
1 addition, 1 deletion
src/TypedData/PatternDataDefinition.php
tests/features/overview.feature
+0
-2
0 additions, 2 deletions
tests/features/overview.feature
tests/src/fixtures/validation.yml
+4
-4
4 additions, 4 deletions
tests/src/fixtures/validation.yml
with
5 additions
and
7 deletions
src/TypedData/PatternDataDefinition.php
+
1
−
1
View file @
4b97af5e
...
...
@@ -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'
))
...
...
This diff is collapsed.
Click to expand it.
tests/features/overview.feature
+
0
−
2
View file @
4b97af5e
...
...
@@ -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.
|
This diff is collapsed.
Click to expand it.
tests/src/fixtures/validation.yml
+
4
−
4
View file @
4b97af5e
...
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment