def validate_on_leave(self):
    '\n        Validates pages and their input elements within the section.\n\n        Can be overloaded to change the validating behavior of a derived\n        section.\n\n        Notes:\n            Validation is conducted only for pages that are direct\n            children of this section. Pages in subsections are not\n            validated.\n\n        Raises:\n            ValidationError: If validation fails.\n        '
    for page in self.pages.values():
        if (not page._validate()):
            raise ValidationError()
        if (not page._validate_elements()):
            msg = self.exp.config.get('hints', 'no_input_section_validation')
            msg = msg.format(n=len(self.pages))
            self.exp.post_message(msg, level='danger')
            raise ValidationError()
Validates pages and their input elements within the section.

Can be overloaded to change the validating behavior of a derived
section.

Notes:
    Validation is conducted only for pages that are direct
    children of this section. Pages in subsections are not
    validated.

Raises:
    ValidationError: If validation fails.
def validate_on_leave(self):
    '\n        Validates pages and their input elements within the section.\n\n        Can be overloaded to change the validating behavior of a derived\n        section.\n\n        Notes:\n            Validation is conducted only for pages that are direct\n            children of this section. Pages in subsections are not\n            validated.\n\n        Raises:\n            ValidationError: If validation fails.\n        '
    for page in self.pages.values():
        if (not page._validate()):
            raise ValidationError()
        if (not page._validate_elements()):
            msg = self.exp.config.get('hints', 'no_input_section_validation')
            msg = msg.format(n=len(self.pages))
            self.exp.post_message(msg, level='danger')
            raise ValidationError()