File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
app/Http/Requests/Admin/Egg Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
88* ` [rc.1] ` — Fixes exception thrown when revoking user sessions.
99* ` [rc.1] ` — Fixes exception that would occur when trying to delete allocations from a node.
1010* ` [rc.1] ` — Fixes exception thown when attempting to adjust mail settings as well as a validation error thrown afterwards.
11+ * ` [rc.1] ` — Fixes bug preventing modification of the default value for an Egg variable.
1112
1213## v0.7.0-rc.1 (Derelict Dermodactylus)
1314### Fixed
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ public function rules()
2020 'env_variable ' => 'required|regex:/^[\w]{1,255}$/|notIn: ' . EggVariable::RESERVED_ENV_NAMES ,
2121 'options ' => 'sometimes|required|array ' ,
2222 'rules ' => 'bail|required|string ' ,
23+ 'default_value ' => 'present ' ,
2324 ];
2425 }
2526
@@ -38,10 +39,8 @@ public function withValidator($validator)
3839 // If rules is not a string it is already violating the rule defined above
3940 // so just skip the addition of default value rules since this request
4041 // will fail anyways.
41- if (! is_string ($ rules )) {
42- return ;
43- }
44-
45- $ validator ->addRules (['default_value ' => $ rules ]);
42+ $ validator ->sometimes ('default_value ' , $ rules , function () use ($ rules ) {
43+ return is_string ($ rules );
44+ });
4645 }
4746}
You can’t perform that action at this time.
0 commit comments