public static function checkCardHolderData($value, $type = '') {       
        
        $value = filter_var(trim($value),FILTER_SANITIZE_SPECIAL_CHARS);
        
        //validate length of input data and throw exception
        //if maximum characters is not mentioned in $_inputFldMaxLength the sanitized values will be returned
        if (!empty(self::$_inputFldMaxLength[$type]) && strlen($value) > self::$_inputFldMaxLength[$type]) {            
            $errorMessage = "The value for $type can be no more than " . self::$_inputFldMaxLength[$type] . ' characters, Please try again after making corrections';
            throw new HpsInvalidRequestException(
                HpsExceptionCodes::INVALID_INPUT_LENGTH, $errorMessage
            );
        }
        return $value;
    }