Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions pkg/validate/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,5 @@ func Host(v string) error {
if proxyIP != nil {
return nil
}
re := regexp.MustCompile("^[a-z]")
if !re.MatchString(v) {
return errors.New("domain name must begin with a lower-case letter")
}
return validateSubdomain(v)
}
3 changes: 1 addition & 2 deletions pkg/validate/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func TestVCenter(t *testing.T) {
{"single lowercase", "a", true},
{"single uppercase", "A", false},
{"contains whitespace", "abc D", false},
{"single number", "1", false},
{"single number", "1", true},
{"single dot", ".", false},
{"ends with dot", "a.", false},
{"starts with dot", ".a", false},
Expand All @@ -115,7 +115,6 @@ func TestVCenter(t *testing.T) {
{"contains non-ascii", "a日本語a", false},
{"URLs", "https://hello.openshift.org", false},
{"IP", "192.168.1.1", true},
{"invalid IP", "192.168.1", false},
}
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {
Expand Down