validators

package
v0.0.0-...-851e7b8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Regx

type Regx struct {
}

Regx is tool to validate some data

func (*Regx) IsChinaMobileString

func (r *Regx) IsChinaMobileString(str string) bool

IsChinaMobileString was used for check chinese mobile macth Some methods existing, use that

func (*Regx) IsChineseChar

func (r *Regx) IsChineseChar(str string) bool

IsChineseChar to case if string in range in chinese unicode 检验是否为合法的文

func (*Regx) IsMailString

func (r *Regx) IsMailString(str string) bool

IsMailString is defined to check a string is email str is the target string check for

func (*Regx) IsNicknameString

func (r *Regx) IsNicknameString(str string) bool

IsNicknameString defined to validate a string is in nick name creation rules 昵称不校验长度

func (*Regx) IsPasswordString

func (r *Regx) IsPasswordString(str string) bool

IsPasswordString is defined to check string is valid for password creation

func (*Regx) IsUserNameString

func (r *Regx) IsUserNameString(str string) bool

IsUserNameString defined to validate a string is in username name creation rules 用户名长度不得低于3

func (*Regx) Struct2Map

func (r *Regx) Struct2Map(obj interface{}) map[string]interface{}

Struct2Map is defined to transform a struct to string map

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL