Q:

jQuery check if one of the inputs with same class is not empty

I'm having two elements with same classname and I am doing $(".text-input") to select all of them. In the on input callback,
$(".text-input").on("input", function (event) {
console.log(is any of those not empty?);
})

in of any one of these, I want to know if at least one of the input boxes are not empty. How do I do this?

A:

Actually, you shoulld always .trim() the content before testing.
You don't want whitespaces to account for a valid input value:

$(".text-input").on("input", function() {
   const is_empty = !this.value.trim();
   if (is_empty) console.log("field is empty");
   $(this).toggleClass("is-empty", is_empty);
});
/* bool helpers */
.is-empty {
  outline: 2px solid red;
  outline-offset: -2px;
}
<input type="text" class="text-input">
<input type="text" class="text-input">

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

To answer your second question:

"I want to know if at least one of the input boxes are not empty. How do I do this?"

Use Array.prototype.some()

    // Return true if at least one input has value
    const atLeastOneNotEmpty = (elements) => {
      return [...elements].some(el => el.value.trim());
    }

Example code

const $inp = $(".text-input");

const validateEmpty = () => {
  $inp.each((i, el) => {
     const is_empty = !el.value.trim();
     if (is_empty) console.log(`field ${el.name} is empty`);
     el.classList.toggle("is-empty", is_empty);
  }); 
};

// Return true if at least one input has value
const atLeastOneNotEmpty = (ELs) => [...ELs].some(el => el.value.trim());

$inp.on('input', validateEmpty);

$("#test").on("click", () => {
  console.log(atLeastOneNotEmpty(jQuery.makeArray($inp)))
});
/* bool helpers */
.is-empty {
  outline: 2px solid red;
  outline-offset: -2px;
}
<input type="text" class="text-input" name="a"><br>
<input type="text" class="text-input" name="b" value="foo"><br>
<input type="text" class="text-input" name="c"><br>
<button id="test" type="button">TEST one has value</button>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

