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: settings.go
    path of file: ./repos/corteza/server/system/service
    
    the code of the file until where you have to start completion: package service

import (
	"context"
	"fmt"
	"strings"
	"sync"
	"time"

	"github.com/cortezaproject/corteza/server/pkg/actionlog"
	"github.com/spf13/cast"

	"github.com/cortezaproject/corteza/server/pkg/errors"
	"github.com/cortezaproject/c
    
func check(vv ...*types.SettingValue) (ok bool, err error) {
	set := append(types.SettingValueSet{}, vv...)
	err = set.Walk(func(val *types.SettingValue) error {
		if val == nil || val.Value == nil {
			return err
		}

		vs := val.String()
		if len(vs) == 0 && len(val.Value.String()) > 0 {
			vs = val.Value.String()
		}

		// Password constraints: The min password length should be 8
		if val.Name == "auth.internal.password-constraints.min-length" {
			if cast.ToInt(vs) < passwordMinLength {
				return SettingsErrInvalidPasswordMinLength()
			}
		}

		// Password constraints: The min upper case count should not be a negative number
		if val.Name == "auth.internal.password-constraints.min-upper-case" {
			if cast.ToInt(vs) < 0 {
				return SettingsErrInvalidPasswordMinUpperCase()
			}
		}

		// Password constraints: The min lower case count should not be a negative number
		if val.Name == "auth.internal.password-constraints.min-lower-case" {
			if cast.ToInt(vs) < 0 {
				return SettingsErrInvalidPasswordMinLowerCase()
			}
		}

		// Password constraints: The min number of numeric characters should not be a negative number
		if val.Name == "auth.internal.password-constraints.min-num-count" {
			if cast.ToInt(vs) < 0 {
				return SettingsErrInvalidPasswordMinNumCount()
			}
		}

		// Password constraints: The min number of special characters should not be a negative number
		if val.Name == "auth.internal.password-constraints.min-special-count" {
			if cast.ToInt(vs) < 0 {
				return SettingsErrInvalidPasswordMinSpecialCharCount()
			}
		}

		return err
	})
	if err != nil {
		return false, err
	}

	return true, nil
}