fix: Validate template version name (#6804)

* WIP

* Update

* Validation
This commit is contained in:
Marcin Tojek
2023-03-27 13:54:01 +02:00
committed by GitHub
parent e0cc4ee7f8
commit 8187992e7f
6 changed files with 105 additions and 10 deletions

View File

@ -44,7 +44,7 @@ func init() {
valid := NameValid(str)
return valid == nil
}
for _, tag := range []string{"username", "template_name", "workspace_name"} {
for _, tag := range []string{"username", "template_name", "workspace_name", "template_version_name"} {
err := Validate.RegisterValidation(tag, nameValidator)
if err != nil {
panic(err)