def validate_message_text(self, message_string):
        """With a message string, check to see if it contains a SendGrid API Key
            If a key is found, throw an exception

           :param message_string: message that will be sent
           :type message_string: string
           :raises ApiKeyIncludedException: If message_string matches a regex
                                            string
        """
        if isinstance(message_string, str):
            for regex in self.regexes:
                if regex.match(message_string) is not None:
                    raise ApiKeyIncludedException()
def validate_message_text ( self , message_string ) : if isinstance ( message_string , str ) : for regex in self . regexes : if regex . match ( message_string ) is not None : raise ApiKeyIncludedException ( )
With a message string, check to see if it contains a SendGrid API Key
            If a key is found, throw an exception

           :param message_string: message that will be sent
           :type message_string: string
           :raises ApiKeyIncludedException: If message_string matches a regex
                                            string