From 5a4c9422b2bd215ea0432c407c829dc1c0ac2aae Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 11 Oct 2023 12:10:40 +0200 Subject: [PATCH] fix: only require registry image in case of dockerimage bp --- app/Http/Livewire/Project/Application/General.php | 6 ++++++ .../views/livewire/project/application/general.blade.php | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/Http/Livewire/Project/Application/General.php b/app/Http/Livewire/Project/Application/General.php index afe1b62dd..27e30ac18 100644 --- a/app/Http/Livewire/Project/Application/General.php +++ b/app/Http/Livewire/Project/Application/General.php @@ -125,6 +125,12 @@ public function submit() { try { $this->validate(); + if (data_get($this->application,'build_pack') === 'dockerimage') { + $this->validate([ + 'application.docker_registry_image_name' => 'required', + 'application.docker_registry_image_tag' => 'required', + ]); + } if (data_get($this->application, 'fqdn')) { $domains = Str::of($this->application->fqdn)->trim()->explode(',')->map(function ($domain) { return Str::of($domain)->trim()->lower(); diff --git a/resources/views/livewire/project/application/general.blade.php b/resources/views/livewire/project/application/general.blade.php index 4492c8192..c156645a9 100644 --- a/resources/views/livewire/project/application/general.blade.php +++ b/resources/views/livewire/project/application/general.blade.php @@ -73,8 +73,8 @@ @else
- - + +
@endif