hasErrors()) { $errors = $model->getErrors(); return false; } else { return $model->getAttributes(); } } /** * 校验邮箱 * @param $email * @return bool */ public static function isEmail($email) { $bool = false; if (preg_match(self::REGEX_EMAIL, $email)) { $bool = true; } return $bool; } }