def _validate_format(self, parser, format_dict):
        """
        Validates the given format dictionary. Each key of this dict refers to a specific BBCode placeholder type.
        eg. {TEXT} or {TEXT1} refer to the 'TEXT' BBCode placeholder type.
        Each content is validated according to its associated placeholder type.
        """
        for placeholder_string, content in format_dict.items():
            try:
                placeholder_results = re.findall(placeholder_content_re, placeholder_string)
                assert len(placeholder_results)
                placeholder_type, _, extra_context = placeholder_results[0]
                valid_content = parser.placeholders[placeholder_type.upper()].validate(content, extra_context=extra_context[1:])
                assert valid_content and valid_content is not None
            except __HOLE__:
                raise InvalidBBCodePlaholder(placeholder_type)
            except AssertionError:
                return False
        return True
dataset/ETHPy150Open ellmetha/django-precise-bbcode/precise_bbcode/bbcode/tag.py/BBCodeTag._validate_format