diff --git a/functions.go b/functions.go index 37a7ebf..39a5f06 100644 --- a/functions.go +++ b/functions.go @@ -292,3 +292,10 @@ func Any[T comparable](val T, vv ...T) ValidationFunc { return errors.New("value not found in allowed values") } } + +// AnyString will check if the provided string is in a set of allowed values. +// +// Deprecated: use Any instead. Will be removed in a future release. +func AnyString(val string, vv ...string) ValidationFunc { + return Any(val, vv...) +}