def is_valid(self):
valid = super(XmlObjectForm, self).is_valid() andall(s.is_valid() for s in six.itervalues(self.subforms)) andall(s.is_valid() for s in six.itervalues(self.formsets))<EOL>if valid and self.instance is not None:<EOL><INDENT>instance = self.update_instance()<EOL>if instance.is_valid():<EOL><INDENT>return True<EOL><DEDENT>else:<EOL><INDENT>if NON_FIELD_ERRORS not in self._errors:<EOL><INDENT>self._errors[NON_FIELD_ERRORS] = self.error_class()<EOL><DEDENT>self._errors[NON_FIELD_ERRORS].append("<STR_LIT>" +<EOL>"<STR_LIT>")<EOL>for err in instance.validation_errors():<EOL><INDENT>self._errors[NON_FIELD_ERRORS].append('<STR_LIT>' % err.message)<EOL><DEDENT>return False<EOL><DEDENT><DEDENT>return valid<EOL>
Returns True if this form and all subforms (if any) are valid.

        If all standard form-validation tests pass, uses :class:`~eulxml.xmlmap.XmlObject`
        validation methods to check for schema-validity (if a schema is associated)
        and reporting errors.  Additonal notes:

         * schema validation requires that the :class:`~eulxml.xmlmap.XmlObject`
           be initialized with the cleaned form data, so if normal validation
           checks pass, the associated :class:`~eulxml.xmlmap.XmlObject` instance
           will be updated with data via :meth:`update_instance`
         * schema validation errors SHOULD NOT happen in a production system

        :rtype: boolean