diff --git a/proxmox/type_tag.go b/proxmox/type_tag.go index 8c355eec..39ea9d1c 100644 --- a/proxmox/type_tag.go +++ b/proxmox/type_tag.go @@ -9,11 +9,11 @@ import ( type Tag string var ( - regexTag = regexp.MustCompile(`^[a-z0-9_]+$`) + regexTag = regexp.MustCompile(`^[a-z0-9_][a-z0-9_-]*$`) ) const ( - Tag_Error_Invalid string = "tag may only include the following characters: abcdefghijklmnopqrstuvwxyz0123456789_" + Tag_Error_Invalid string = "tag may not start with - and may only include the following characters: abcdefghijklmnopqrstuvwxyz0123456789_-" 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" diff --git a/test/data/test_data_tag/type_Tag.go b/test/data/test_data_tag/type_Tag.go index a0b15cae..c2a64869 100644 --- a/test/data/test_data_tag/type_Tag.go +++ b/test/data/test_data_tag/type_Tag.go @@ -22,7 +22,6 @@ func Tag_Character_Illegal() []string { `Tag'Name`, `Tag~Name`, `Name