Skip to content

Commit

Permalink
Merge pull request #368 from xrayj11/master
Browse files Browse the repository at this point in the history
tags - allow uppercase
  • Loading branch information
Tinyblargon authored Oct 22, 2024
2 parents 0f47ff7 + d5b3125 commit b149708
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions proxmox/type_tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
type Tag string

var (
regexTag = regexp.MustCompile(`^[a-z0-9_][a-z0-9_-]*$`)
regexTag = regexp.MustCompile(`^[a-zA-Z0-9_][a-zA-Z0-9_-]*$`)
)

const (
Tag_Error_Invalid string = "tag may not start with - and may only include the following characters: abcdefghijklmnopqrstuvwxyz0123456789_-"
Tag_Error_Invalid string = "tag may not start with - and may only include the following characters: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-"
Tag_Error_Duplicate string = "duplicate tag found"
Tag_Error_MaxLength string = "tag may only be 124 characters"
Tag_Error_Empty string = "tag may not be empty"
Expand Down
2 changes: 1 addition & 1 deletion test/data/test_data_tag/type_Tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ func Tag_Character_Illegal() []string {
`Tag with space`,
`Tag&`,
`Tag*Name`,
`Tag-Name`,
`Tag#Name`,
`Tag(Name)`,
`Tag/Name`,
Expand Down Expand Up @@ -65,5 +64,6 @@ func Tag_Legal() []string {
`python`,
`72d1109e_97f6_41e7_96cc_18a8b7dc19dc`,
`dash-tag`,
`TagName`,
}, Tag_Max_Legal())
}

0 comments on commit b149708

Please sign in to comment.