JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" id="do" name="do" />
JavaScript
$(function() {
$('#do').on('input', function() {
array = ['08','06','05','03','123456'];
do = $(this).val();
if ($.inArray(do, array) > -1) {
$(this).css('background-color', '#FFFFFF');
console.log (do + ' - ' + array + ' - not found');
} else {
$(this).css('background-color', '#FAFAFA');
console.log (do + ' - ' + array + ' - found');
}
});
});