Skip to content

Commit

Permalink
Completely relax requirements for result names
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Dec 12, 2024
1 parent fcc4cd0 commit 572cea6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion flows/results.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
)

func init() {
resultNameRegex := regexp.MustCompile(`^[a-zA-Z0-9\-_\s&:/@%?',]{1,64}$`)
resultNameRegex := regexp.MustCompile(`^.{1,64}$`)
resultCategoryRegex := regexp.MustCompile(`^.{1,36}$`)

utils.RegisterValidatorTag("result_name",
Expand Down
2 changes: 1 addition & 1 deletion flows/results_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func TestResultNameAndCategoryValidation(t *testing.T) {

obj := testStruct{
ValidName: "Color",
InvalidName: "#",
InvalidName: "1234567890123456789012345678901234567890123456789012345678901234567890",
ValidCategory: "Blue",
InvalidCategory: "1234567890123456789012345678901234567",
}
Expand Down

0 comments on commit 572cea6

Please sign in to comment.