MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / ValidatePassword

Function ValidatePassword

internal/users/users.go:561–570  ·  view source on GitHub ↗
(pw string)

Source from the content-addressed store, hash-verified

559}
560
561func ValidatePassword(pw string) error {
562
563 validation := configs.GetValidationConfig()
564
565 if len(pw) < int(validation.PasswordSizeMin) || len(pw) > int(validation.PasswordSizeMax) {
566 return fmt.Errorf("password must be between %d and %d characters long", validation.PasswordSizeMin, validation.PasswordSizeMax)
567 }
568
569 return nil
570}
571
572// CharacterNameSearch returns the userId and username for the given character
573// name. It consults the in-memory CharacterIndex, which is populated at startup

Callers 1

ValidatePasswordFunction · 0.92

Calls 1

GetValidationConfigFunction · 0.92

Tested by

no test coverage detected