We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
如果需要验证参数先移步企业版,开源暂时没有。
// 测试入参验证 func (api *Index) SaveVeriApi(c *gf.GinCtx) { //获取传参 param, _ := gf.RequestParam(c) //验证规则 rules := map[string]string{ "account": "bail|required|length:6,16|same:qq", "password": "required|same:password2", "password2": "required", } if err := gf.Validator().Rules(rules).Data(param).Locale(gconv.String(param["locale"])).Run(c); err != nil { gf.Failed().SetMsg(err.String()).Regin(c) return } res, err := gf.Model("user").Data(param).Save() if err != nil { gf.Failed().SetMsg("错误").SetData(err).Regin(c) } else { gf.Success().SetMsg("添加成功").SetData(res).SetExdata(param).Regin(c) } }
更多请到文档查看
Sorry, something went wrong.
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: