fix size validation error again, add tests

This commit is contained in:
Aneurin Barker Snook
2023-10-16 17:43:05 +01:00
parent 7701f5c6fa
commit d59fb7b944
2 changed files with 54 additions and 1 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ func MaxSize[T any](l int) func([]T) error {
func MinSize[T any](l int) func([]T) error {
return func(value []T) error {
if len(value) < l {
return ErrTooFewChars
return ErrTooFewItems
}
return nil
}