diff --git a/CHANGELOG.md b/CHANGELOG.md index a5f0db8b1..bd777f36b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines. ### Changed * PHP 7.2 is now the minimum required version for this software. +* Egg variable default values are no longer validated aganist the ruleset when configuring them. Validation of those rules will only occur when editing or creating a server. ## v0.7.0-rc.2 (Derelict Dermodactylus) ### Fixed diff --git a/app/Http/Requests/Admin/Egg/EggVariableFormRequest.php b/app/Http/Requests/Admin/Egg/EggVariableFormRequest.php index a8047f55d..933bf8348 100644 --- a/app/Http/Requests/Admin/Egg/EggVariableFormRequest.php +++ b/app/Http/Requests/Admin/Egg/EggVariableFormRequest.php @@ -23,24 +23,4 @@ class EggVariableFormRequest extends AdminFormRequest 'default_value' => 'present', ]; } - - /** - * Run validation after the rules above have been applied. - * - * @param \Illuminate\Validation\Validator $validator - */ - public function withValidator($validator) - { - $rules = $this->input('rules'); - if ($this->method() === 'PATCH') { - $rules = $this->input('rules', $this->route()->parameter('egg')->rules); - } - - // If rules is not a string it is already violating the rule defined above - // so just skip the addition of default value rules since this request - // will fail anyways. - $validator->sometimes('default_value', $rules, function () use ($rules) { - return is_string($rules); - }); - } }