We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d935a41 commit a837faeCopy full SHA for a837fae
coderd/httpapi/name.go
@@ -57,8 +57,8 @@ func TemplateDisplayNameValid(str string) error {
57
if len(str) == 0 {
58
return nil // empty display_name is correct
59
}
60
- if len(str) > 32 {
61
- return xerrors.New("must be <= 32 characters")
+ if len(str) > 64 {
+ return xerrors.New("must be <= 64 characters")
62
63
matched := templateDisplayName.MatchString(str)
64
if !matched {
coderd/httpapi/name_test.go
@@ -92,6 +92,9 @@ func TestTemplateDisplayNameValid(t *testing.T) {
92
{"a1b2c3d4e5f6g7h8i9j0k-", true},
93
{"BANANAS_wow", true},
94
{"test--now", true},
95
+ {"123456789012345678901234567890123", true},
96
+ {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", true},
97
+ {"1234567890123456789012345678901234567890123456789012345678901234", true},
98
99
{" ", false},
100
{" a", false},
@@ -107,10 +110,7 @@ func TestTemplateDisplayNameValid(t *testing.T) {
107
110
{"-123456789012345678901", false},
108
111
{"-a1b2c3d4e5f6g7h8i9j0k", false},
109
112
{"-abcdefghijKLmnopqrstu", false},
-
- {"123456789012345678901234567890123", false},
- {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", false},
113
- {"123456789012345678901234567890123123456789012345678901234567890123", false},
+ {"12345678901234567890123456789012345678901234567890123456789012345", false},
114
115
for _, testCase := range testCases {
116
testCase := testCase
0 commit comments