Add password reset functionality to user dashboard page
This commit is contained in:
@ -72,19 +72,10 @@ func ValidatePassword(password string) bool {
|
||||
}
|
||||
|
||||
var (
|
||||
hasSymbol bool
|
||||
hasNumber int
|
||||
hasUppercase bool
|
||||
)
|
||||
|
||||
symbols := []string{"!", "@", "#", "$", "%", "^", "&", "*"}
|
||||
|
||||
for _, symbol := range symbols {
|
||||
if strings.Contains(password, symbol) {
|
||||
hasSymbol = true
|
||||
}
|
||||
}
|
||||
|
||||
for _, char := range password {
|
||||
switch {
|
||||
case unicode.IsNumber(char):
|
||||
@ -94,7 +85,7 @@ func ValidatePassword(password string) bool {
|
||||
}
|
||||
}
|
||||
|
||||
return hasSymbol && hasNumber >= 3 && hasUppercase
|
||||
return hasNumber >= 3 && hasUppercase
|
||||
}
|
||||
|
||||
func ConvertFileSize(byte int64) string {
|
||||
|
Reference in New Issue
Block a user