def validate(self):
    'Validates various properties of the SubtopicPage object.\n\n        Raises:\n            ValidationError. One or more attributes of the subtopic page are\n                invalid.\n        '
    if (not isinstance(self.topic_id, python_utils.BASESTRING)):
        raise utils.ValidationError(('Expected topic_id to be a string, received %s' % self.topic_id))
    if (not isinstance(self.version, int)):
        raise utils.ValidationError(('Expected version number to be an int, received %s' % self.version))
    self.page_contents.validate()
    if (not isinstance(self.page_contents_schema_version, int)):
        raise utils.ValidationError(('Expected page contents schema version to be an integer, received %s' % self.page_contents_schema_version))
    if (self.page_contents_schema_version != feconf.CURRENT_SUBTOPIC_PAGE_CONTENTS_SCHEMA_VERSION):
        raise utils.ValidationError(('Expected page contents schema version to be %s, received %s' % (feconf.CURRENT_SUBTOPIC_PAGE_CONTENTS_SCHEMA_VERSION, self.page_contents_schema_version)))
    if (not isinstance(self.language_code, python_utils.BASESTRING)):
        raise utils.ValidationError(('Expected language code to be a string, received %s' % self.language_code))
    if (not any(((self.language_code == lc['code']) for lc in constants.SUPPORTED_CONTENT_LANGUAGES))):
        raise utils.ValidationError(('Invalid language code: %s' % self.language_code))
Validates various properties of the SubtopicPage object.

Raises:
    ValidationError. One or more attributes of the subtopic page are
        invalid.
def validate(self):
    'Validates various properties of the SubtopicPage object.\n\n        Raises:\n            ValidationError. One or more attributes of the subtopic page are\n                invalid.\n        '
    if (not isinstance(self.topic_id, python_utils.BASESTRING)):
        raise utils.ValidationError(('Expected topic_id to be a string, received %s' % self.topic_id))
    if (not isinstance(self.version, int)):
        raise utils.ValidationError(('Expected version number to be an int, received %s' % self.version))
    self.page_contents.validate()
    if (not isinstance(self.page_contents_schema_version, int)):
        raise utils.ValidationError(('Expected page contents schema version to be an integer, received %s' % self.page_contents_schema_version))
    if (self.page_contents_schema_version != feconf.CURRENT_SUBTOPIC_PAGE_CONTENTS_SCHEMA_VERSION):
        raise utils.ValidationError(('Expected page contents schema version to be %s, received %s' % (feconf.CURRENT_SUBTOPIC_PAGE_CONTENTS_SCHEMA_VERSION, self.page_contents_schema_version)))
    if (not isinstance(self.language_code, python_utils.BASESTRING)):
        raise utils.ValidationError(('Expected language code to be a string, received %s' % self.language_code))
    if (not any(((self.language_code == lc['code']) for lc in constants.SUPPORTED_CONTENT_LANGUAGES))):
        raise utils.ValidationError(('Invalid language code: %s' % self.language_code))