Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Semantics of username being applied to usernames and workspace names #1756

Closed as not planned
@greyscaled

Description

@greyscaled

Developer Story

We have a custom username validator (that we register on Go Validator) called username:

err := validate.RegisterValidation("username", func(fl validator.FieldLevel) bool {

It's being applied to both usernames:

Username string `json:"username" validate:"required,username"`

and workspace names:

Name string `json:"name" validate:"username,required"`

These semantics don't overlap cleanly - is a workspace name a username ?

It may be the case that workspace names and usernames have the same validation under-the-hood, but the questions remain:

  • should username be generalized then (renamed)
  • should we create a new validation for workspace name (even though it's the same)

S/o to @oxy for helping to identify this 🎉 !

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiArea: HTTP APIstaleThis issue is like stale bread.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions