refactor validation

This commit is contained in:
Michael Jerger 2024-05-01 15:02:27 +02:00
parent 4b2802a6ba
commit be6e6eb96a
4 changed files with 7 additions and 7 deletions

View file

@ -57,7 +57,7 @@ func ValidateMaxLen(value string, maxLen int, name string) []string {
return []string{}
}
func ValidateOneOf(value any, allowed []any) []string {
func ValidateOneOf(value any, allowed []any, name string) []string {
for _, allowedElem := range allowed {
if value == allowedElem {
return []string{}