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 ¶
func IsInvalidUsername ¶
func IsNotZeroString ¶
IsNotZeroString check s is not empty string and is not "0"
func IsQuestionsIgnorePath ¶
IsQuestionsIgnorePath checks whether the questionID is in ignore path
func IsReservedUsername ¶
IsReservedUsername checks whether the username is reserved
func IsSupportedImageFile ¶
IsSupportedImageFile currently answers support image type is `image/jpeg, image/jpg, image/png, image/gif, image/webp`
func IsUsersIgnorePath ¶
IsUsersIgnorePath checks whether the username is in ignore path
Types ¶
type PathIgnore ¶
Click to show internal directories.
Click to hide internal directories.