verify.go 1.7 KB

1234567891011121314151617181920212223
  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. )