def validate(self, request):
validated_parameter_set = self.__class__()<EOL>for attribute_name, type_instance in self.getmembers():<EOL><INDENT>if not isinstance(type_instance, String) andnot isinstance(type_instance, Float) andnot isinstance(type_instance, Integer) andnot isinstance(type_instance, Date) andnot isinstance(type_instance, DateTime) andnot isinstance(type_instance, Array):<EOL><INDENT>raise TypeError("<STR_LIT>" % attribute_name)<EOL><DEDENT>if issubclass(type_instance.__class__, Array):<EOL><INDENT>if not isinstance(type_instance.element_template, String) andnot isinstance(type_instance.element_template, Float) andnot isinstance(type_instance.element_template, Integer):<EOL><INDENT>raise TypeError("<STR_LIT>" % attribute_name)<EOL><DEDENT><DEDENT>try:<EOL><INDENT>if issubclass(type_instance.__class__, Array):<EOL><INDENT>validation_input = request.params.getall(attribute_name)<EOL><DEDENT>else:<EOL><INDENT>try:<EOL><INDENT>validation_input = request.params.getone(attribute_name)<EOL><DEDENT>except KeyError:<EOL><INDENT>validation_input = None<EOL><DEDENT><DEDENT>validation_result = type_instance.validate(validation_input)<EOL>setattr(validated_parameter_set, attribute_name, validation_result)<EOL><DEDENT>except exception.DataValidationException as exp:<EOL><INDENT>raise exception.ValidationError(<EOL>message=str(exp),<EOL>attribute_name=attribute_name,<EOL>value=validation_input,<EOL>blueprint=type_instance.blueprint())<EOL><DEDENT><DEDENT>return validated_parameter_set<EOL>
validate method for %ParameterSet

Since the introduction of ResponseFieldListParser, the parameter _response_field_list
will be ignored, this is a prestans reserved parameter, and cannot be used by apps.

:param request: The request object to be validated
:type request: webob.request.Request
:return The validated parameter set
:rtype: ParameterSet