diff --git a/modules/validation/helpers.go b/modules/validation/helpers.go index cc3c40bd15..032c996fb5 100644 --- a/modules/validation/helpers.go +++ b/modules/validation/helpers.go @@ -151,3 +151,7 @@ func ValidateOneOf(value string, allowed []string) []string { } return []string{fmt.Sprintf("Value %v is not contained in allowed values [%v]", value, allowed)} } + +func ValidateSuffix(str, suffix string) bool { + return strings.HasSuffix(str, suffix) +}