Validating form manually
In most cases, the form can be validated automatically when user click its Submit button via the SubmitButton plugin.
FormValidation also allows us to validate the form manually by using the validate() method. The following piece of code demonstrates how to validate a form when user click on a normal button:
We are able to improve the user experience by letting user know that the form is going to be validated. It's useful if the validation takes time (let's say that you are using the remote validator).
For example, by triggering the core.form.validating event, we can show a progress bar or simply update the button content such as: