def validate_match(self, value, model_instance):
        object_name = model_instance._meta.verbose_name
        match = False
        for pattern in model_instance.oembed_schema:
            regex_pattern = fnmatch.translate(pattern)
            if re.match(regex_pattern, value):
                match = True
                break
        if not match:
            raise ValidationError(
                _('Invalid %s URL') % object_name
            )
Validation method to ensure that the field's value matches one of the
dataset/ETHPy150Open chuckharmston/django-tumblelog/tumblelog/fields.py/OEmbedURLField.validate_match