def _is_valid_string(self, inpt, metadata):
if not is_string(inpt):<EOL><INDENT>return False<EOL><DEDENT>if metadata.get_minimum_string_length() and len(inpt) < metadata.get_minimum_string_length():<EOL><INDENT>return False<EOL><DEDENT>elif metadata.get_maximum_string_length() and len(inpt) > metadata.get_maximum_string_length():<EOL><INDENT>return False<EOL><DEDENT>if metadata.get_string_set() and inpt not in metadata.get_string_set():<EOL><INDENT>return False<EOL><DEDENT>else:<EOL><INDENT>return True<EOL><DEDENT>
Checks if input is a valid string