def customValidation(self):
    (information, warnings, critical) = ([], [], [])
    if (hasattr(self, 'response') and (self.response == ERROR) and self.errorMessage.isEmpty()):
        critical.append(f".response is '{ERROR}', but .errorMessage is missing.")
    if ((self.response == 'success') and (not self.name.getText())):
        warnings.append("The response has no .name value. It is not required, but highly recommended, to describe the purpose of this subscription to the user (such as 'Commercial Fonts', 'Free Fonts', etc. This is especially useful if you offer several different subscriptions to the same user.")
    foundryIDs = []
    familyIDs = []
    fontIDs = []
    for foundry in self.foundries:
        foundryIDs.append(foundry.uniqueID)
        for family in foundry.families:
            familyIDs.append(family.uniqueID)
            for font in family.fonts:
                fontIDs.append(font.uniqueID)
    import collections
    duplicateFoundryIDs = [item for (item, count) in list(collections.Counter(foundryIDs).items()) if (count > 1)]
    if duplicateFoundryIDs:
        critical.append(('Duplicate unique foundry IDs: %s' % duplicateFoundryIDs))
    duplicateFamilyIDs = [item for (item, count) in list(collections.Counter(familyIDs).items()) if (count > 1)]
    if duplicateFamilyIDs:
        critical.append(('Duplicate unique family IDs: %s' % duplicateFamilyIDs))
    duplicateFontIDs = [item for (item, count) in list(collections.Counter(fontIDs).items()) if (count > 1)]
    if duplicateFontIDs:
        critical.append(('Duplicate unique family IDs: %s' % duplicateFontIDs))
    (newInformation, newWarnings, newCritical) = super().customValidation()
    if newInformation:
        information.extend(newInformation)
    if newWarnings:
        warnings.extend(newWarnings)
    if newCritical:
        critical.extend(newCritical)
    return (information, warnings, critical)
def customValidation(self):
    (information, warnings, critical) = ([], [], [])
    if (hasattr(self, 'response') and (self.response == ERROR) and self.errorMessage.isEmpty()):
        critical.append(f".response is '{ERROR}', but .errorMessage is missing.")
    if ((self.response == 'success') and (not self.name.getText())):
        warnings.append("The response has no .name value. It is not required, but highly recommended, to describe the purpose of this subscription to the user (such as 'Commercial Fonts', 'Free Fonts', etc. This is especially useful if you offer several different subscriptions to the same user.")
    foundryIDs = []
    familyIDs = []
    fontIDs = []
    for foundry in self.foundries:
        foundryIDs.append(foundry.uniqueID)
        for family in foundry.families:
            familyIDs.append(family.uniqueID)
            for font in family.fonts:
                fontIDs.append(font.uniqueID)
    import collections
    duplicateFoundryIDs = [item for (item, count) in list(collections.Counter(foundryIDs).items()) if (count > 1)]
    if duplicateFoundryIDs:
        critical.append(('Duplicate unique foundry IDs: %s' % duplicateFoundryIDs))
    duplicateFamilyIDs = [item for (item, count) in list(collections.Counter(familyIDs).items()) if (count > 1)]
    if duplicateFamilyIDs:
        critical.append(('Duplicate unique family IDs: %s' % duplicateFamilyIDs))
    duplicateFontIDs = [item for (item, count) in list(collections.Counter(fontIDs).items()) if (count > 1)]
    if duplicateFontIDs:
        critical.append(('Duplicate unique family IDs: %s' % duplicateFontIDs))
    (newInformation, newWarnings, newCritical) = super().customValidation()
    if newInformation:
        information.extend(newInformation)
    if newWarnings:
        warnings.extend(newWarnings)
    if newCritical:
        critical.extend(newCritical)
    return (information, warnings, critical)