JSFiddle - React, Tailwind, and code Playground
by juna
HTML
<textarea id="input"></textarea>
<input id="button" type="button" value="submit" />
JavaScript
$('#input').keyup(function() {
if(!$(this).val().match(/^(?!\s)([a-zA-Z0-9 _.)?&]){1,}$/g)) {
$('#button').prop('disabled', true);
}else{
$('#button').prop('disabled', false);
}
});