// 验证规则
protected $role = [
'name|姓名'=>'require|length:5,20|chsAlphaNum',
'email|邮箱'=>'require|email|unique:user',
'mobile|手机'=>'require"mobile|unique:user',
'password|密码'=>'require|length:6,20|alphaNum|confirm'
];
// 验证数据
$data = Request::port();
$rule = 'app\common\validate\User';
$res = $this->validate($data, $rule); // ====没有执行