XHR submit and form validation

This page demonstrates how to use Spry first to validate the page and then if the validation passes how to submit the form without refreshing the current page.

It requires PHP scripting enabled on the server. This sample is linked to the php version for the submit checker.

To see an XHR submit sample go here

Here's a form with all types of fields:

Username: A value is required.
Password: A value is required. The minimum number of characters not met.
Confirm Password: A value is required. The values don't match
Male/Female: Please select a valid item. Please select an item.
Married: Please specify a value.

Here's the response from the server: