Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var PasswordValidator validator.Func = func(fl validator.FieldLevel) bool { lenCheck := len(fl.Field().String()) >= 8 hasDigit := false hasLetter := false hasCapital := false hasSpecial := false for _, c := range fl.Field().String() { if c >= '0' && c <= '9' { hasDigit = true } else if c >= 'a' && c <= 'z' { hasLetter = true } else if c >= 'A' && c <= 'Z' { hasCapital = true } else { hasSpecial = true } } return lenCheck && hasDigit && hasLetter && hasCapital && hasSpecial }
Functions ¶
func GenerateToken ¶
func HashPassword ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.