JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" id="Max" name="Max" />
<input type="text" id="Min" name="Min" />
<div id="errormess"></div>
CSS
#errormess{
color : red;
}
JavaScript
$("#Max").focusout(function(){
if(parseInt($(this).val()) < parseInt($("#Min").val()))
{
$("#errormess").html('Max value cannot be lower then min Value');
}
else{ $("#errormess").html(''); }
});
$("#Min").focusout(function(){
if(parseInt($(this).val()) >= parseInt($("#Max").val()))
{
$("#errormess").html('Max value cannot be lower then min Value');
}
else{ $("#errormess").html(''); }
});