@@ -172,8 +172,10 @@ func (m *manager) AddImage(imageName, image, projectNamespace, dockerfile string
172172 registryHostname = generator .GithubContainerRegistry
173173 } else {
174174 registryHostname , err = m .log .Question (& survey.QuestionOptions {
175- Question : "Please provide the registry hostname without the image path (e.g. gcr.io, ghcr.io, ecr.io)" ,
176- DefaultValue : "gcr.io" ,
175+ Question : "Please provide the registry hostname without the image path (e.g. gcr.io, ghcr.io, ecr.io)" ,
176+ DefaultValue : "gcr.io" ,
177+ ValidationRegexPattern : "^[^A-Z\\ s]+\\ .[^A-Z\\ s]+$" ,
178+ ValidationMessage : "Error parsing registry username: must only include lowercase letters." ,
177179 })
178180 if err != nil {
179181 return err
@@ -264,12 +266,13 @@ func (m *manager) addPullSecretConfig(dockerClient docker.Client, image string)
264266
265267 registryUsername , err = m .log .Question (& survey.QuestionOptions {
266268 Question : usernameQuestion ,
267- ValidationRegexPattern : "^.*$" ,
269+ ValidationRegexPattern : "^[^A-Z\\ s]+\\ .[^A-Z\\ s]+$" ,
270+ ValidationMessage : "Error parsing registry username: must only include lowercase letters." ,
268271 })
272+
269273 if err != nil {
270274 return "" , err
271275 }
272-
273276 if registryUsername != "" {
274277 registryPassword , err = m .log .Question (& survey.QuestionOptions {
275278 Question : passwordQuestion ,
0 commit comments