verify.go 2.5 KB

12345678910111213141516171819202122232425262728293031323334
  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. PageInfoVerify = Rules{"Page": {NotEmpty()}, "PageSize": {NotEmpty()}}
  10. CustomerVerify = Rules{"CustomerName": {NotEmpty()}, "CustomerPhoneData": {NotEmpty()}}
  11. AutoCodeVerify = Rules{"Abbreviation": {NotEmpty()}, "StructName": {NotEmpty()}, "PackageName": {NotEmpty()}, "Fields": {NotEmpty()}}
  12. AutoPackageVerify = Rules{"PackageName": {NotEmpty()}}
  13. AuthorityVerify = Rules{"AuthorityId": {NotEmpty()}, "AuthorityName": {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. LogCodingVerify = Rules{"Coding": {NotEmpty()}, "Describe": {NotEmpty()}}
  19. LogAddVerify = Rules{"LogUuid": {NotEmpty()}, "Coding": {NotEmpty()}}
  20. PcVerify = Rules{"PcCode": {NotEmpty()}, "User": {NotEmpty()}, "Supplier": {NotEmpty()}}
  21. //自己添加的校验
  22. GameChannelVerify = Rules{"ChannelName": {NotEmpty()}, "ChannelDesc": {NotEmpty()}, "DisplaySequence": {NotEmpty()}}
  23. GameListVerify = Rules{"GameName": {NotEmpty()}, "GamePort": {NotEmpty()}, "LoginType": {NotEmpty()}}
  24. LoginTypeVerify = Rules{"LoginName": {NotEmpty()}, "LoginDesc": {NotEmpty()}}
  25. ResponsiblePersonVerify = Rules{"Name": {NotEmpty()}}
  26. AccountTypeVerify = Rules{"TypeName": {NotEmpty()}}
  27. GameTaskVerify = Rules{"TaskId": {NotEmpty()}, "TaskName": {NotEmpty()}, "User": {NotEmpty()}, "NewRetained": {NotEmpty()}, "GamePortId": {NotEmpty()}}
  28. TaskIdVerify = Rules{"TaskId": {NotEmpty()}}
  29. UpdateTargetVerify = Rules{"TaskId": {NotEmpty()}, "CreateDate": {NotEmpty()}}
  30. DownloadFileVerify = Rules{"GameId": {NotEmpty()}, "Md5String": {NotEmpty()}}
  31. )