def valid(self):
    if (not self.value):
        return True
    found = False
    for mimeType in list(MIMETYPES.keys()):
        if (self.value in MIMETYPES[mimeType]['fileExtensions']):
            found = True
            break
    if found:
        return True
    else:
        return ("Unknown font extension: '%s'. Possible: %s" % (self.value, FILEEXTENSIONS))
def valid(self):
    if (not self.value):
        return True
    found = False
    for mimeType in list(MIMETYPES.keys()):
        if (self.value in MIMETYPES[mimeType]['fileExtensions']):
            found = True
            break
    if found:
        return True
    else:
        return ("Unknown font extension: '%s'. Possible: %s" % (self.value, FILEEXTENSIONS))