19 lines
347 B
PHP
19 lines
347 B
PHP
|
<?php
|
||
|
namespace app\user\validate;
|
||
|
|
||
|
use think\Validate;
|
||
|
|
||
|
/**
|
||
|
* 角色验证器
|
||
|
* @package app\admin\validate
|
||
|
* @author 蔡伟明 <314013107@qq.com>
|
||
|
*/
|
||
|
class Role extends Validate
|
||
|
{
|
||
|
// 定义验证规则
|
||
|
protected $rule = [
|
||
|
'pid|所属角色' => 'require',
|
||
|
'name|角色名称' => 'require|unique:admin_role',
|
||
|
];
|
||
|
}
|