From 9d1f2cf7f15bf45cf7348b8b8af007849bd06ab3 Mon Sep 17 00:00:00 2001 From: Matthew Casperson Date: Mon, 6 Jan 2025 07:37:58 +1000 Subject: [PATCH] Validation must be done after initial values are set --- internal/steps/octopus_destination_details.go | 4 ++-- internal/steps/octopus_details.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/steps/octopus_destination_details.go b/internal/steps/octopus_destination_details.go index 69aa57e..137e059 100644 --- a/internal/steps/octopus_destination_details.go +++ b/internal/steps/octopus_destination_details.go @@ -84,8 +84,6 @@ func (s OctopusDestinationDetails) GetContainer(parent fyne.Window) *fyne.Contai next.Enable() } - validation("") - heading := widget.NewLabel("Octopus Destination Server") heading.TextStyle = fyne.TextStyle{Bold: true} @@ -112,6 +110,8 @@ func (s OctopusDestinationDetails) GetContainer(parent fyne.Window) *fyne.Contai s.spaceId.SetPlaceHolder("Spaces-#") s.spaceId.SetText(s.State.DestinationSpace) + validation("") + s.server.OnChanged = validation s.apiKey.OnChanged = validation s.spaceId.OnChanged = validation diff --git a/internal/steps/octopus_details.go b/internal/steps/octopus_details.go index 74acb4e..f71aa1b 100644 --- a/internal/steps/octopus_details.go +++ b/internal/steps/octopus_details.go @@ -83,8 +83,6 @@ func (s OctopusDetails) GetContainer(parent fyne.Window) *fyne.Container { next.Enable() } - validation("") - heading := widget.NewLabel("Octopus Source Server") heading.TextStyle = fyne.TextStyle{Bold: true} @@ -107,6 +105,8 @@ func (s OctopusDetails) GetContainer(parent fyne.Window) *fyne.Container { s.spaceId.SetPlaceHolder("Spaces-#") s.spaceId.SetText(s.State.Space) + validation("") + s.server.OnChanged = validation s.apiKey.OnChanged = validation s.spaceId.OnChanged = validation