validate_rules.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. use app\model\AdminMenuModel;
  3. use app\model\CommonModel;
  4. use app\model\GroupModel;
  5. use app\model\RoleModel;
  6. use app\model\ThemeModel;
  7. return [
  8. //【通用】
  9. 'common' => [
  10. 'keyword|关键字' => 'chsDash|max:100',
  11. 'page|页码' => 'require|number|gt:0',
  12. 'size|每页数量' => 'require|number|elt:100',
  13. 'status|状态' => 'number|in:' . CommonModel::$status_normal . ',' . CommonModel::$status_disable,
  14. 'company_id|企业' => 'number|gt:0',
  15. 'card_id|卡类型' => 'number|gt:0',
  16. ],
  17. //【启禁用】
  18. 'status' => [
  19. 'id' => 'require|number|gt:0',
  20. 'status|状态' => 'require|number|in:' . CommonModel::$status_normal . ',' . CommonModel::$status_disable,
  21. ],
  22. //【登录】
  23. 'login' => [
  24. 'username|卡号' => 'require|max:255',
  25. 'password|密码' => 'require|max:255',
  26. ],
  27. //【地址】
  28. //添加
  29. 'AddrAdd' => [
  30. 'addr_code|收货地址省市区编码' => 'require|array|length:3',
  31. 'addr|详情地址' => 'require|max:255',
  32. 'contactor|联系人' => 'require|max:255',
  33. 'mobile|联系电话' => 'require|mobile',
  34. ],
  35. ];