JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" value="" />
<input type="text" value="" />
<input type="text" value="" />
<input type="text" value="" />
<input type="text" value="" />
JavaScript
var empty = $('input:text').filter(function() { return $(this).val() == ""; });
alert(empty.length);
if(empty.length >3){
alert("you must enter data in at least two inputs");
}