'不存在的手机号码' ], [ 'code', new PhoneCode($this, ['login', 'phone']), 'msg' => '短信验证码错误' ], [ 'phone', new AutoRegPhoneValidator($this, ['user']), 'msg' => '手机号码不可用' ], [ 'phone', new CanLoginValidator($this), 'msg' => '不能登录' ], [ 'phone',new NoLogin($this), 'msg'=>'重复的登陆,请清空应用储存数据或重新安装后重试' ], [ 'phone', new Model2UnitValidator($this, ['user', 'userLogic']), 'msg' => '' ] ]; // 错误次数验证 $v = new PhoneContinuousTimes($this); array_unshift($rules,[ 'phone',$v, 'msg'=>'登录错误过多,限制登录' ]); $this->addConsumeErrorValidator($v); // 登录封禁 $loginJIn = new LoginJizhi($this); array_unshift($rules,[ 'phone',$loginJIn, 'msg'=>'登录错误过多,限制登录12小时' ]); return parent::rules($rules); } }