Documentation ¶
Index ¶
- Constants
- func CheckPassword(password string) error
- func EmailInAllowEmailDomain(email string, allowEmailDomains []string) bool
- func IsChinese(str string) bool
- func IsInvalidUsername(username string) bool
- func IsNotZeroString(s string) bool
- func IsQuestionsIgnorePath(questionID string) bool
- func IsReservedUsername(username string) bool
- func IsSupportedImageFile(file io.Reader, ext string) bool
- func IsUsersIgnorePath(username string) bool
- type PathIgnore
Constants ¶
View Source
const ( LevelC LevelB LevelA LevelS )
View Source
const (
PasswordCannotContainSpaces = "error.password.space_invalid"
)
Variables ¶
This section is empty.
Functions ¶
func CheckPassword ¶
CheckPassword checks the password strength
func EmailInAllowEmailDomain ¶ added in v1.1.0
func IsInvalidUsername ¶ added in v1.0.4
func IsNotZeroString ¶ added in v1.0.2
IsNotZeroString check s is not empty string and is not "0"
func IsQuestionsIgnorePath ¶ added in v1.1.0
IsQuestionsIgnorePath checks whether the questionID is in ignore path
func IsReservedUsername ¶ added in v1.0.2
IsReservedUsername checks whether the username is reserved
func IsSupportedImageFile ¶ added in v1.0.4
IsSupportedImageFile currently answers support image type is `image/jpeg, image/jpg, image/png, image/gif, image/webp`
func IsUsersIgnorePath ¶ added in v1.1.0
IsUsersIgnorePath checks whether the username is in ignore path
Types ¶
type PathIgnore ¶ added in v1.1.0
Click to show internal directories.
Click to hide internal directories.