src/Controller.php
protected function getEmailMust(string $name = 'email', string $msg = ''): string
    {
        $v = $this->getStringMust($name, $msg);

        if (false === filter_var($v, FILTER_VALIDATE_EMAIL)) {
            trigger_error('邮箱格式错误', E_USER_ERROR);
        }
        return $v;
    }
protected function getEmailMust(string $name = 'email', string $msg = ''): string
    {
        $v = $this->getStringMust($name, $msg);

        if (false === filter_var($v, FILTER_VALIDATE_EMAIL)) {
            trigger_error('邮箱格式错误', E_USER_ERROR);
        }
        return $v;
    }
从请求参数中获取邮箱地址(Email)
@param $name string 参数名称
@param $msg string 错误提示
@return string