Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v1.2.0
type Config struct {
PasswordLenMin uint
PasswordLenMax uint
EmailLenMax uint
PostContentsLenMin uint
PostContentsLenMax uint
PostTitleLenMin uint
PostTitleLenMax uint
ReactionMessageLenMin uint
ReactionMessageLenMax uint
UserDisplayNameLenMin uint
UserDisplayNameLenMax uint
}
Config represents the validator configuration
type Validator ¶
type Validator interface {
// Email returns an error if the given email address is invalid,
// otherwise returns nil
Email(v string) error
// Password returns an error if the given password is invalid,
// otherwise returns nil
Password(v string) error
// PostContents returns an error if the given post contents are invalid,
// otherwise returns nil
PostContents(v string) error
// PostTitle returns an error if the given post title is invalid,
// otherwise returns nil
PostTitle(v string) error
// ReactionMessage returns an error if the given reaction message is
// invalid, otherwise returns nil
ReactionMessage(v string) error
// UserDisplayName returns an error if the given user display name is
// invalid, otherwise returns nil
UserDisplayName(v string) error
}
Validator represents a validator interface
Click to show internal directories.
Click to hide internal directories.