def anyviolation(tickets, i, rule):
    """ does the i'th field in any ticket violate the given rule? """
    for ticket in tickets:
        val = ticket.values[i]
        if rule.anyok(val):
            continue
        return True
    return False