Skip to content

Commit

Permalink
Improve invalid org name error message (#3817)
Browse files Browse the repository at this point in the history
Closes #3789

Signed-off-by: Sergio Castaño Arteaga <tegioz@icloud.com>
  • Loading branch information
tegioz authored May 16, 2024
1 parent f231cbb commit c786115
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/org/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ func validateOrg(org *hub.Organization) error {
return fmt.Errorf("%w: %s", hub.ErrInvalidInput, "name not provided")
}
if !organizationNameRE.MatchString(org.Name) {
return fmt.Errorf("%w: %s", hub.ErrInvalidInput, "invalid name")
return fmt.Errorf("%w: %s", hub.ErrInvalidInput, "invalid name (only lowercase alphanumeric characters and hyphens are allowed)")
}
if org.LogoImageID != "" {
if _, err := uuid.FromString(org.LogoImageID); err != nil {
Expand Down

0 comments on commit c786115

Please sign in to comment.