def _is_valid_input(self, inpt, metadata, array):
<EOL>syntax = metadata.get_syntax()<EOL>if metadata.is_required and not inpt:<EOL><INDENT>return False<EOL><DEDENT>valid = True  <EOL>if array:<EOL><INDENT>if len(inpt) < metadata.get_minimum_elements():<EOL><INDENT>valid = False<EOL><DEDENT>elif len(inpt) > metadata.get_maximum_elements():<EOL><INDENT>valid = False<EOL><DEDENT>else:<EOL><INDENT>for element in inpt:<EOL><INDENT>valid = (valid and self._is_valid_input(element, metadata, False))<EOL><DEDENT><DEDENT><DEDENT>elif syntax == '<STR_LIT>':<EOL><INDENT>valid = self._is_valid_id(inpt)<EOL><DEDENT>elif syntax == '<STR_LIT>':<EOL><INDENT>valid = self._is_valid_type(inpt)<EOL><DEDENT>elif syntax == '<STR_LIT>':<EOL><INDENT>valid = self._is_valid_boolean(inpt)<EOL><DEDENT>elif syntax == '<STR_LIT>':<EOL><INDENT>valid = self._is_valid_string(inpt, metadata)<EOL><DEDENT>elif syntax == '<STR_LIT>':<EOL><INDENT>valid = self._is_valid_integer(inpt, metadata)<EOL><DEDENT>elif syntax == '<STR_LIT>':<EOL><INDENT>valid = self._is_valid_decimal(inpt, metadata)<EOL><DEDENT>elif syntax == '<STR_LIT>':<EOL><INDENT>valid = self._is_valid_date_time(inpt, metadata)<EOL><DEDENT>elif syntax == '<STR_LIT>':<EOL><INDENT>valid = self._is_valid_duration(inpt, metadata)<EOL><DEDENT>elif syntax == '<STR_LIT>':<EOL><INDENT>valid = self._is_valid_cardinal(inpt, metadata)<EOL><DEDENT>elif syntax == '<STR_LIT>':<EOL><INDENT>valid = self._is_valid_integer(inpt, metadata)<EOL><DEDENT>elif syntax == '<STR_LIT>':<EOL><INDENT>valid = self._is_valid_decimal(inpt, metadata)<EOL><DEDENT>else:<EOL><INDENT>raise errors.OperationFailed('<STR_LIT>' + syntax)<EOL><DEDENT>return valid<EOL>
The _is_valid_input method takes three arguments:

        the user input to be checked, the associated  osid.Metadata object
        containing validation requirements and a boolean value indicating
        whether this is an array value.