Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidType = errors.New("型が相違しています") ErrRequired = errors.New("必須フィールドが欠落しています") ErrSpecialRune = errors.New("特殊文字が含まれています") ErrInvalidRune = errors.New("無効な文字が含まれています") ErrInvalidFormat = errors.New("無効な形式です") ErrInvalidLength = errors.New("長さが指定の範囲外です") ErrForbidden = errors.New("使用できないリソースを指定しています") )
View Source
var IsNotContainSpecialRune = NotContainSpecialRuneRule{}
View Source
var IsNotOnlySpace = NotOnlySpaceRule{}
View Source
var IsPassword = PasswordRule{}
Functions ¶
This section is empty.
Types ¶
type ImagePathOrEmptyRule ¶
type ImagePathOrEmptyRule struct {
// contains filtered or unexported fields
}
func IsImagePathOrEmpty ¶
func IsImagePathOrEmpty(characterId *int) ImagePathOrEmptyRule
func (ImagePathOrEmptyRule) Validate ¶
func (r ImagePathOrEmptyRule) Validate(value interface{}) error
type ImagePathRule ¶
type ImagePathRule struct {
// contains filtered or unexported fields
}
func IsImagePath ¶
func IsImagePath(characterId *int) ImagePathRule
func (ImagePathRule) Validate ¶
func (r ImagePathRule) Validate(value interface{}) error
type NotContainSpecialRuneRule ¶
type NotContainSpecialRuneRule struct{}
func (NotContainSpecialRuneRule) Validate ¶
func (r NotContainSpecialRuneRule) Validate(value interface{}) error
type NotOnlySpaceRule ¶
type NotOnlySpaceRule struct{}
func (NotOnlySpaceRule) Validate ¶
func (r NotOnlySpaceRule) Validate(value interface{}) error
type PasswordRule ¶
type PasswordRule struct{}
func (PasswordRule) Validate ¶
func (r PasswordRule) Validate(value interface{}) error
type UsernameRule ¶
type UsernameRule struct {
// contains filtered or unexported fields
}
func IsUsername ¶
func IsUsername(minLength, maxLength int) UsernameRule
func (UsernameRule) Validate ¶
func (r UsernameRule) Validate(value interface{}) error
Click to show internal directories.
Click to hide internal directories.