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.

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.

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

Was this article helpful?

AppMaster.io 101 Crash Course

10 modules
2 weeks

Not sure where to start? Get going with our crash course for beginners and explore AppMaster from A to Z.

Start Course
Development it’s so easy with AppMaster!

Need More Help?

Solve any issue with the help of our experts. Save time and focus on building your applications.

headphones

Contact Support

Tell us about your problem, and we’ll find you a solution.

message

Community Chat

Discuss questions with other users in our chat.

Join Community