public function rules(){ return [ //必须填写 ['email, username, password,agree,verifyPassword,verifyCode', 'required'], //检查用户名是否重复 ['email','unique','message'=>'用户名已占用'], //用户输入最大的字符限制 ['email, username', 'length', 'max'=>64], //限制用户最小长度和最大长度 ['usernam…