Getting notified while field is being validated

When using either callback, promise or remote validator, your validation logic might take time. For instance, the remote validator connects to the server side and executes a few of database queries to check whether or not the field is valid. These kind of process could force the user to wait for a busy processing. User even don't have idea about what is happening.

This example displays a progress bar when the validation is being processed. It enhances the user experience of the application.

First, prepare the progress bar in the markup:

Tip

The demo assume that you're using the Bootstrap framework. Of course, you can use other progress bar component provided by the Foundation, Semantic UI or UIKit frameworks.

Next, display the progress bar when the field is being validated. Also, gide it when the validation is done.

For testing purpose, the demo always answers that the username is already taken no matter what you input.

More examples

Related validators

The following validators might be useful to you.