// 驗證規則
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); // ====沒有執行