validate_rules.php 898 B

12345678910111213141516171819202122232425262728293031323334
  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. ];