JSFiddle - React, Tailwind, and code Playground
HTML
<form action="" id="id_form">
<input name="name" type="text">
<input name="email" type="text">
<input name="site" type="text">
<input type="submit" value="submit">
</form>
JavaScript
$('#id_form input').on('blur', function () {
if ($(this).val() == '') {
$(this).css('border', '1px solid #f00');
} else {
$(this).css('border', '1px solid #000');
}
});