'Temporary Ireland VAT validation to support the new format
introduced in January 2013 in Ireland, until upstream is fixed.
TODO: remove when fixed upstream'

def check_vat_ie(self, vat):

    if ((len(vat) not in (8, 9)) or (not vat[2:7].isdigit())):
        return False
    if (len(vat) == 8):
        vat += '    '
    if vat[:7].isdigit():
        return (vat[7] == self._ie_check_char((vat[:7] + vat[8])))
    elif (vat[1] in (string.ascii_uppercase + '+*')):
        return (vat[7] == self._ie_check_char(((vat[2:7] + vat[0]) + vat[8])))
    return False
