chore: corrected misleading error descriptions, removed redundant comments
This commit is contained in:
@@ -45,7 +45,7 @@ func ValidatePassword(password string) error {
|
|||||||
|
|
||||||
if cfg.PasswordCheckCases {
|
if cfg.PasswordCheckCases {
|
||||||
differentCasesPresent := regexp.MustCompile(`(?=.*[a-z])(?=.*[A-Z])`).MatchString(password); if !differentCasesPresent {
|
differentCasesPresent := regexp.MustCompile(`(?=.*[a-z])(?=.*[A-Z])`).MatchString(password); if !differentCasesPresent {
|
||||||
return errors.New("Password must contain at least 1 number")
|
return errors.New("Password must have uppercase and lowercase characters")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user