def METHOD_NAME(self):
    for record in self:
        if len(record.version) not in range(1, 6):
            raise exceptions.ValidationError(
                _(
                    "TicketBAI Tax Agency %(agency)s:\n"
                    "TicketBAI version %(version)s max size is 5 "
                    "characters."
                )
                % {
                    "agency": record.tbai_tax_agency_id.name,
                    "version": record.version,
                }
            )