File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -130,22 +130,16 @@ public function update($id, array $data)
130130 'config_from ' => 'sometimes|required|numeric|exists:service_options,id ' ,
131131 ]);
132132
133- $ validator ->sometimes ('config_startup ' , 'required_without:config_from|json ' , function ($ input ) use ($ option ) {
133+ $ validator ->sometimes ([
134+ 'config_startup ' , 'config_logs ' , 'config_files ' ,
135+ ], 'required_without:config_from|json ' , function ($ input ) use ($ option ) {
134136 return ! (! $ input ->config_from && ! is_null ($ option ->config_from ));
135137 });
136138
137139 $ validator ->sometimes ('config_stop ' , 'required_without:config_from|string|max:255 ' , function ($ input ) use ($ option ) {
138140 return ! (! $ input ->config_from && ! is_null ($ option ->config_from ));
139141 });
140142
141- $ validator ->sometimes ('config_logs ' , 'required_without:config_from|json ' , function ($ input ) use ($ option ) {
142- return ! (! $ input ->config_from && ! is_null ($ option ->config_from ));
143- });
144-
145- $ validator ->sometimes ('config_files ' , 'required_without:config_from|json ' , function ($ input ) use ($ option ) {
146- return ! (! $ input ->config_from && ! is_null ($ option ->config_from ));
147- });
148-
149143 if ($ validator ->fails ()) {
150144 throw new DisplayValidationException ($ validator ->errors ());
151145 }
You can’t perform that action at this time.
0 commit comments