Browse Source

增加后台表单校验工具以及添加校验

main
pixel 5 years ago
parent
commit
108a504103
  1. 4
      server/api/v1/exa_customer.go

4
server/api/v1/exa_customer.go

@ -25,8 +25,6 @@ func CreateExaCustomer(c *gin.Context) {
CustomerVerify := utils.Rules{
"CustomerName": {utils.NotEmpty()},
"CustomerPhoneData": {utils.NotEmpty()},
"SysUserID": {utils.NotEmpty()},
"SysUserAuthorityID": {utils.NotEmpty()},
}
CustomerVerifyErr := utils.Verify(cu, CustomerVerify)
if CustomerVerifyErr != nil {
@ -94,8 +92,6 @@ func UpdateExaCustomer(c *gin.Context) {
CustomerVerify := utils.Rules{
"CustomerName": {utils.NotEmpty()},
"CustomerPhoneData": {utils.NotEmpty()},
"SysUserID": {utils.NotEmpty()},
"SysUserAuthorityID": {utils.NotEmpty()},
}
CustomerVerifyErr := utils.Verify(cu, CustomerVerify)
if CustomerVerifyErr != nil {

Loading…
Cancel
Save