When validating a number's existence in our database using an API, I trigger the API call on the (input) event of a textbox. For example, if I enter '1234' in the input box, the API will make four separate calls: first for '1', second for '12', third for '123', and fourth for '1234'. If '123' doesn't exist in the database, the API returns 'true' and enables a button. However, if '1234' does exist in the database, the API returns 'false' and disables the button. The problem arises when, for a brief moment, the button gets enabled because '123' is true, and the textbox still shows '1234' while the API call for the fourth request is still pending. This unintended button enablement for '1234' can lead to undesired results in subsequent processes. Is there a more efficient way to address this situation?