MCPcopy Create free account
hub / github.com/Scalingo/cli / isPasswordValid

Function isPasswordValid

db/users/utils.go:91–103  ·  view source on GitHub ↗
(password, confirmedPassword string)

Source from the content-addressed store, hash-verified

89}
90
91func isPasswordValid(password, confirmedPassword string) (string, bool) {
92 if password == "" && confirmedPassword == "" {
93 return "", true
94 }
95
96 if password != confirmedPassword {
97 return "Password confirmation doesn't match", false
98 }
99 if len(password) < 24 || len(password) > 64 {
100 return "Password must contain between 24 and 64 characters", false
101 }
102 return "", true
103}
104
105func isUsernameValid(username string) (string, bool) {
106 if len(username) < 6 || len(username) > 32 {

Callers 2

Test_isPasswordValidFunction · 0.85
askForPasswordWithRetryFunction · 0.85

Calls

no outgoing calls

Tested by 1

Test_isPasswordValidFunction · 0.68