(id string)
| 15 | var validMutatorIdPattern = regexp.MustCompile(`^[a-z][a-z0-9_-]*$`) |
| 16 | |
| 17 | func ValidateMutatorId(id string) error { |
| 18 | if id == "" { |
| 19 | return fmt.Errorf("mutatorid is required") |
| 20 | } |
| 21 | if !validMutatorIdPattern.MatchString(id) { |
| 22 | return fmt.Errorf("mutatorid must be lowercase alphanumeric with hyphens/underscores, starting with a letter: %q", id) |
| 23 | } |
| 24 | return nil |
| 25 | } |
| 26 | |
| 27 | func ValidateBuffIds(ids []int) error { |
| 28 | for _, id := range ids { |