public static function checkEmailAddress($value) {
        $value = filter_var(trim($value),FILTER_SANITIZE_EMAIL);
        
        //validate the email address format
        if(!empty($value) && filter_var($value, FILTER_VALIDATE_EMAIL) === false){            
            throw new HpsInvalidRequestException(
                HpsExceptionCodes::INVALID_EMAIL_ADDRESS, 'Invalid email address'
            );
        }

        //validate length of input data and throw exception
        if (!empty(self::$_inputFldMaxLength['Email']) && strlen($value) > self::$_inputFldMaxLength['Email']) {            
            $errorMessage = "The value for Email can be no more than " . self::$_inputFldMaxLength['Email'] . ' characters, Please try again after making corrections';
            throw new HpsInvalidRequestException(
                HpsExceptionCodes::INVALID_INPUT_LENGTH, $errorMessage
            );
        }
        return $value;
    }