type User struct {
Name string `v:"required#请输入用户姓名"`
Type int `v:"required|min:1#|请选择用户类型"`
}
var (
err error
ctx = gctx.New()
user = User{}
)
err = g.Validator().Data(user).Run(ctx)
if err != nil {
fmt.Println(err.(gvalid.Error).Items())
fmt.Println(gerror.Current(err))
}