From da10dacfec5787582aee7b9328e9f26e7da113ed Mon Sep 17 00:00:00 2001 From: RyanSwanson Date: Thu, 16 Jan 2025 11:03:19 -0700 Subject: [PATCH] fix: Removes negative lookahead from regex --- pkg/devspace/configure/image.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/devspace/configure/image.go b/pkg/devspace/configure/image.go index 961ffc5e2c..e45456900e 100644 --- a/pkg/devspace/configure/image.go +++ b/pkg/devspace/configure/image.go @@ -174,7 +174,7 @@ func (m *manager) AddImage(imageName, image, projectNamespace, dockerfile string registryHostname, err = m.log.Question(&survey.QuestionOptions{ Question: "Please provide the registry hostname without the image path (e.g. gcr.io, ghcr.io, ecr.io)", DefaultValue: "gcr.io", - ValidationRegexPattern: "^(?!-)[a-z0-9-]{1,63}(\\.[a-z0-9-]{1,63})*$", + ValidationRegexPattern: "^[a-z0-9][a-z0-9-]{0,62}(\\.[a-z0-9-]{1,63})*$", ValidationMessage: "Error parsing registry hostname: must only include letters, digits, dots and hyphens and cannot exceed 253 characters.", }) if err != nil {