Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Female gender female. Female = 0 // Male gender male. Male = 1 )
Variables ¶
View Source
var ( // ErrUnexpected unexpected error. ErrUnexpected = errors.New("参数校验出错") )
Functions ¶
func Verify ¶
func Verify(obj interface{}) error
Verify checks the data validity of the exportable field of the structure according to the validate tag.
func VerifyVarWithValue ¶
VerifyVarWithValue checks the data validity of the field against another field according to the validate tag.
Types ¶
type BankCard ¶
type BankCard string
BankCard bank card validator.
func NewBankCard ¶
NewBankCard new a bank card validator.
type CorpAccount ¶
type CorpAccount string
CorpAccount corp account validator.
func NewCorpAccount ¶
func NewCorpAccount(corpaccount string) CorpAccount
NewCorpAccount new a corp account validator.
func (CorpAccount) IsValid ¶
func (ca CorpAccount) IsValid() bool
IsValid checks the corp account is valid.
Click to show internal directories.
Click to hide internal directories.