JSFiddle - React, Tailwind, and code Playground

HTML

<form id="myform" action="#" onsubmit="return false" >
    <input type="text" id="one" value="" /><span class="chk"></span><br/>
    <input type="text" id="two" value="" /><span class="chk"></span><br/>
</form>

CSS

.chk { display:none;
        color:red;}

JavaScript

$( function(){
    $('#one, #two').on('blur', function(){
        if($(this).val()==""){
        $(this).next('span').html('le champs '+$(this).attr('id')+' est vide').show()
        }
        else {
        $(this).next('span').html('').hide()
        }
    
    })
})