JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" id="do" name="do" />
<p id="feedback"></p>

JavaScript

$(function () {
    $('#do').on('input', function () {

        var my_array = ['08', '06', '05', '03', '123456'];
        var x = $(this).val();

        if ($.inArray(x, my_array) == -1) {
            $(this).css('background-color', '#f00');
            $("#feedback").text(x + ' - ' + my_array + ' - not found');
        } else {
            $(this).css('background-color', '#0f0');
            $("#feedback").text(x + ' - ' + my_array + ' - found');
        }
    });
});