def METHOD_NAME(self, class_, attr, schema):
    if not re.match('^[A-Za-z0-9_.-]+(\\.%l)?$', schema) \
            or schema in {'.', '..'}:
        self.bad_filename_schemas.append("%s.%s" % (class_, attr))