RoleValidate.php 742 B

123456789101112131415161718192021
  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\admin\validate;
  12. use think\Validate;
  13. class RoleValidate extends Validate
  14. {
  15. protected $rule = [
  16. ['role_name', 'unique:role', '角色已经存在']
  17. ];
  18. }