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(
2424 'foo' => new StringType(),
2525 'bar' => new IntType(),
2626 'buzz' => new AnyType(),
27- 'foobar' => new NullableType(new StringType())
27+ 'foobar' => new NullableType(new StringType()),
28+ 'nested' => new ObjectType([
29+ 'foobar' => new StringType(),
30+ ]),
2831 ])
2932);
3033```
@@ -35,16 +38,25 @@ $data = [
3538 'foo' => 'foe',
3639 'bar' => 'baz',
3740 'buzz' => 'foe',
38- 'foobar' => null
41+ 'foobar' => null,
42+ 'nested' => [
43+ 'foobar' => 'buzz',
44+ ],
3945 ], [
4046 'foo' => 'foe',
4147 'bar' => 7,
4248 'buzz' => 'foe',
4349 'foobar' => 'baz',
50+ 'nested' => [
51+ 'foobar' => 'bozz',
52+ ],
4453 ], [
4554 'foo' => [],
4655 'bar' => 9.1,
4756 'foobar' => 'baz',
57+ 'nested' => [
58+ 'foobar' => 'bazz',
59+ ],
4860 ],
4961];
5062```
@@ -81,4 +93,4 @@ Additionally you can implement the `TypeInterface` and use your own type impleme
8193
8294Checks are special types which can be used to add more rules to a field. So you can check
8395the 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