// Validation rules
protected $role = [
'name|Name'=>'require|length:5,20|chsAlphaNum',
'email|Mailbox'= >'require|email|unique:user',
'mobile|mobile phone'=>'require"mobile|unique:user',
'password|password'=>'require|length:6 ,20|alphaNum|confirm'
];
// Validation data
$data = Request::port();
$rule = 'app\common\validate\User' ;
$res = $this->validate($data, $rule); // ====not executed
solved! Verification rule name variable definition and usage are inconsistent