ocket8888 commented on code in PR #6959:
URL: https://github.com/apache/trafficcontrol/pull/6959#discussion_r920737548


##########
lib/go-tc/roles.go:
##########
@@ -59,8 +59,9 @@ type RoleV40 struct {
 
 // Validate will validate and make sure all that the fields in the supplied 
RoleV4 struct are semantically correct.
 func (role RoleV4) Validate() error {
+       noSpaces := validation.NewStringRule(tovalidate.NoSpaces, "cannot 
contain spaces")
        errs := validation.Errors{
-               "name":        validation.Validate(role.Name, 
validation.Required),
+               "name":        validation.Validate(role.Name, 
validation.Required, noSpaces),

Review Comment:
   Restricting names to not contain spaces is a breaking API change, and I 
don't think it's necessary to fix this bug.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to