verify.go 1.5 KB

12345678910111213141516171819
  1. package utils
  2. var (
  3. IdVerify = Rules{"ID": {NotEmpty()}}
  4. ApiVerify = Rules{"Path": {NotEmpty()}, "Description": {NotEmpty()}, "ApiGroup": {NotEmpty()}, "Method": {NotEmpty()}}
  5. MenuVerify = Rules{"Path": {NotEmpty()}, "ParentId": {NotEmpty()}, "Name": {NotEmpty()}, "Component": {NotEmpty()}, "Sort": {Ge("0")}}
  6. MenuMetaVerify = Rules{"Title": {NotEmpty()}}
  7. LoginVerify = Rules{"CaptchaId": {NotEmpty()}, "Captcha": {NotEmpty()}, "Username": {NotEmpty()}, "Password": {NotEmpty()}}
  8. RegisterVerify = Rules{"Username": {NotEmpty()}, "NickName": {NotEmpty()}, "Password": {NotEmpty()}, "AuthorityId": {NotEmpty()}}
  9. RegisterWxVerify = Rules{"Username": {NotEmpty()}, "NickName": {NotEmpty()}, "OpenId": {NotEmpty()}, "HeaderImg": {NotEmpty()}}
  10. PageInfoVerify = Rules{"Page": {NotEmpty()}, "PageSize": {NotEmpty()}}
  11. CustomerVerify = Rules{"CustomerName": {NotEmpty()}, "CustomerPhoneData": {NotEmpty()}}
  12. AutoCodeVerify = Rules{"Abbreviation": {NotEmpty()}, "StructName": {NotEmpty()}, "PackageName": {NotEmpty()}, "Fields": {NotEmpty()}}
  13. AuthorityVerify = Rules{"AuthorityId": {NotEmpty()}, "AuthorityName": {NotEmpty()}, "ParentId": {NotEmpty()}}
  14. AuthorityIdVerify = Rules{"AuthorityId": {NotEmpty()}}
  15. OldAuthorityVerify = Rules{"OldAuthorityId": {NotEmpty()}}
  16. ChangePasswordVerify = Rules{"Username": {NotEmpty()}, "Password": {NotEmpty()}, "NewPassword": {NotEmpty()}}
  17. SetUserAuthorityVerify = Rules{"AuthorityId": {NotEmpty()}}
  18. )