validator.go 424 B

12345678910111213141516171819202122
  1. package initialize
  2. import "github.com/flipped-aurora/gin-vue-admin/server/utils"
  3. func init() {
  4. _ = utils.RegisterRule("PageVerify",
  5. utils.Rules{
  6. "Page": {utils.NotEmpty()},
  7. "PageSize": {utils.NotEmpty()},
  8. },
  9. )
  10. _ = utils.RegisterRule("IdVerify",
  11. utils.Rules{
  12. "Id": {utils.NotEmpty()},
  13. },
  14. )
  15. _ = utils.RegisterRule("AuthorityIdVerify",
  16. utils.Rules{
  17. "AuthorityId": {utils.NotEmpty()},
  18. },
  19. )
  20. }