Skip to content

Commit d116566

Browse files
committed
Address PR comments
1 parent f3c0c42 commit d116566

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

coderd/httpapi/name.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ func TemplateDisplayNameValid(str string) error {
8282

8383
// UserRealNameValid returns whether the input string is a valid real user name.
8484
func UserRealNameValid(str string) error {
85-
if len(str) > 64 {
86-
return xerrors.New("must be <= 64 characters")
85+
if len(str) > 128 {
86+
return xerrors.New("must be <= 128 characters")
8787
}
8888

8989
trimmed := strings.TrimSpace(str)

coderd/httpapi/name_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,10 @@ func TestUserRealNameValid(t *testing.T) {
224224
{"Mr Bean", true},
225225
{"Severus Snape", true},
226226
{"Prof. Albus Percival Wulfric Brian Dumbledore", true},
227+
{"Pablo Diego José Francisco de Paula Juan Nepomuceno María de los Remedios Cipriano de la Santísima Trinidad Ruiz y Picasso", true},
228+
{"Hector Ó hEochagáin", true},
229+
{"Małgorzata Kalinowska-Iszkowska", true},
230+
{"成龍", true},
227231
{". .", true},
228232

229233
{"Lord Voldemort ", false},

0 commit comments

Comments
 (0)