You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: slice.go
    path of file: ./repos/iris/x/errors/validation
    
    the code of the file until where you have to start completion: package validation

import "fmt"

// SliceType is a type constraint that accepts any slice type.
type SliceType[T any] interface {
	~[]T
}

// SliceError describes a slice field validation error.
type 
    
func SliceLength[T any, V SliceType[T]](min, max int) func(s V) string {
	return func(s V) string {
		n := len(s)

		if min == max {
			if n != min {
				return fmt.Sprintf("must be %d elements", min)
			}

			return ""
		}

		if n < min || n > max {
			return fmt.Sprintf("must be between %d and %d elements", min, max)
		}

		return ""
	}
}