public static function email($email = null, $errorMsg = null)
    {
        if (!$email) return null;

        // Convert to lowercase and set UTF-8 character encoding
        $email = trim(mb_strtolower(trim($email), "UTF-8"));

        // Validate email address
        if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
            return null;
        }
        // Return email address
        return $email;
    }