File tree 1 file changed +13
-4
lines changed
1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -13,14 +13,21 @@ public function __construct(array $params)
13
13
parent ::__construct ($ params );
14
14
}
15
15
16
+ public function expandGroup ($ name ) {
17
+ $ group = $ this ->fieldsetGroups ()[$ name ] ?? null ;
18
+ if ($ group ) {
19
+ return $ group ['sets ' ];
20
+ } else {
21
+ return [$ name ];
22
+ }
23
+ }
24
+
16
25
public function getRequires (): array {
17
- $ min = $ this ->requires ['min ' ] ?? [];
18
- $ max = $ this ->requires ['max ' ] ?? [];
19
26
20
27
$ constraints = [];
21
28
22
29
foreach (['min ' , 'max ' ] as $ varname ) {
23
- $ constraint = $ $ varname ;
30
+ $ constraint = $ this -> requires [ $ varname] ?? [] ;
24
31
25
32
if (!is_array ($ constraint )) {
26
33
$ $ varname = [];
@@ -46,7 +53,9 @@ public function getRequires(): array {
46
53
continue ;
47
54
}
48
55
49
- $ constraints [$ field ][$ varname ] = $ columnWidth ;
56
+ foreach ($ this ->expandGroup ($ field ) as $ field ) {
57
+ $ constraints [$ field ][$ varname ] = $ columnWidth ;
58
+ }
50
59
}
51
60
}
52
61
}
You can’t perform that action at this time.
0 commit comments