JSFiddle - React, Tailwind, and code Playground

HTML

<label class="form-group">
<span>×</span>
<input class="form-control validate" id="email" type="text" required>
</label>

<label class="form-group">
<span>×</span>
<input class="form-control validate" id="email" type="text" required>
</label>

JavaScript

$('label.form-group').keyup(function () {
    $(this).children('span:first-child').show();
    
    if ($('label.form-group input').value === '' || $('label.form-group input').value === this.defaultValue) {
      $('label.form-group>span:first-child').hide();
    }
  });