Skip to content

Commit

Permalink
fix: only allow lowercase chars for new runtimes
Browse files Browse the repository at this point in the history
  • Loading branch information
shifty11 committed Mar 12, 2024
1 parent d06298d commit 8c33be9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/kystrap/cmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/spf13/cobra"
)

var regexpAlphaNumericAndDash = regexp.MustCompile(`^[a-zA-Z0-9-]+$`)
var regexpAlphaNumericAndDash = regexp.MustCompile(`^[a-z0-9-]+$`)

var (
flagLanguage = commoncmd.OptionFlag[types.Language]{
Expand Down Expand Up @@ -46,7 +46,7 @@ var (
return errors.New("name must be at least 3 characters long")
}
if !regexpAlphaNumericAndDash.MatchString(input) {
return errors.New("name must only contain alphanumeric characters and dashes")
return errors.New("name must only contain lowercase alphanumeric characters and dashes")
}
return nil
},
Expand Down

0 comments on commit 8c33be9

Please sign in to comment.