JSFiddle - React, Tailwind, and code Playground
by phollome
HTML
<input id="input" type="text" />
<p id="valid">
</p>
JavaScript
const input = document.getElementById('input');
const valid = document.getElementById('valid');
input.addEventListener('input', () => {
valid.innerHTML = /(one|common|word|or|another)/.test(input.value);
});