Search Item

I have created a search feature on my website, the idea is if I type in one of the item number the information associated with that item number will come up(this is from a database). I only want the information to come up if the user types the number in correctly, (meaning I only want it to come up if I type 0000103 instead of just 00) does anyone know how to do that?

Sample code

wixData.query("CollectionName")
.eq("fieldkeyToSearch", $w("#inputFieldId").value)
.find()
.then((results) => {
  if (results.totalCount > 0) {
    // You have found records here, do stuff
  } else {
    // No records found, do some other stuff here
  }
})