File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,10 @@ $requirement = new ListType(
24
24
'foo' => new StringType(),
25
25
'bar' => new IntType(),
26
26
'buzz' => new AnyType(),
27
- 'foobar' => new NullableType(new StringType())
27
+ 'foobar' => new NullableType(new StringType()),
28
+ 'nested' => new ObjectType([
29
+ 'foobar' => new StringType(),
30
+ ]),
28
31
])
29
32
);
30
33
```
@@ -35,16 +38,25 @@ $data = [
35
38
'foo' => 'foe',
36
39
'bar' => 'baz',
37
40
'buzz' => 'foe',
38
- 'foobar' => null
41
+ 'foobar' => null,
42
+ 'nested' => [
43
+ 'foobar' => 'buzz',
44
+ ],
39
45
], [
40
46
'foo' => 'foe',
41
47
'bar' => 7,
42
48
'buzz' => 'foe',
43
49
'foobar' => 'baz',
50
+ 'nested' => [
51
+ 'foobar' => 'bozz',
52
+ ],
44
53
], [
45
54
'foo' => [],
46
55
'bar' => 9.1,
47
56
'foobar' => 'baz',
57
+ 'nested' => [
58
+ 'foobar' => 'bazz',
59
+ ],
48
60
],
49
61
];
50
62
```
@@ -81,4 +93,4 @@ Additionally you can implement the `TypeInterface` and use your own type impleme
81
93
82
94
Checks are special types which can be used to add more rules to a field. So you can check
83
95
the length of a string, the count of elements in an array or determine if
84
- a numeric value is in a given range.
96
+ a numeric value is in a given range.
You can’t perform that action at this time.
0 commit comments