The Debounce parameter sets the delay (in ms) for the onChange trigger to run. This parameter is found in blocks that change the properties of input fields, such as InputString Update Properties.
The default value of Debounce is 0, but you can set any delay. However, values from 500 to 1500 are optimal for perception.
Using Debounce to validate email input
You often have to check the user's values somewhere, such as email, when registering and entering the application. You can set up email validation and perform it when changes are made to the input field. In this case, the check result will be negative until the user fully enters his email. For such cases, Debounce is needed. Let's take a look at the Debounce parameter in practice. Take the input email from the standard AppMaster login page.
On the onCreate trigger, set Debounce using the InputEmail Update Properties block.
Set up email verification.
Set up validation for the onChange trigger and use the IsValidEmail block. Let's pass the value from the trigger to this block.
The next step is to change the Validate Status field to Error if the validation fails. To do this, we need an If-Else block. Pass the result from the Is Valid Email block to it.
Use the InputEmail Update Properties block, in which the Validate Status should be changed to Error, and set the Validate Message to “Incorrect email.”
Now do the same for successful entry. Set them to the true connector of the If-Else block.
This is the result