ki/Interleaved_2_of_5
    """

    digits = event.target.value

    if len(digits) % 2 != 0:
        return
    if [digit for digit in digits if digit not in "0123456789"]:
        return

    top = '<svg height="58" width="{0}" style="background:white">'
    bar = '<rect x="{0}" y="4" width="{1}" height="50" style="fill:black"/>'
    barcode = [top.format(len(digits) * 14 + 24)]

    byte_map = {
        '0': (2, 2, 4, 4, 2), '1': (4, 2, 2, 2, 4),
        '2': (2, 4, 2, 2, 4), '3': (4, 4, 2, 2, 2),
       