Please run this demo from a WebServer, it will fail otherwise.

This demonstrations shows the use of Ajax form and field validations.
The form validation implements callback hooks, so please check the javascript console

Ajax validation