RoleValidate.php 830 B

1234567891011121314151617181920212223
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | snake
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2022 http://baiyf.cn All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: NickBai <1902822973@qq.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\index\validate;
  12. use think\Validate;
  13. class RoleValidate extends Validate
  14. {
  15. protected $rule = array(
  16. 'role_name' => 'require|unique:role',
  17. );
  18. protected $message = array(
  19. 'role_name.require' => '角色已经存在',
  20. );
  21. }