When we surf in internet, we are often asked to filled in a form. The most important aspects of building and processing a form is how the form validates data, helps the visitor with tips, how to make it easy to understand what’s required and optional and how it performs after hitting the submit button. If form validation does not work well, most of the us will leave the site.
Below collected examples will be useful stuff in helping you learn how to create a form that will process and validate inputs using AJAX.
Roscripts Ajax Form Validation
This example is a registration page which will do nothing after validation but show errors or a success message.
This shows two examples of client side validation in a form using JavaScript (with jQuery). The username will check with the server whether the chosen name is valid and available. The avatar example tries to load the URL in to a hidden image, if it fails, it shows the appropriate message.
This form validation application validates a registration form, using both AJAX validation (client side) and typical server-side validation:
AJAX-style (on the client), when each form field loses focus (onblur). The field’s value is sent to the server, which validates the data and returns a result (0 for failure, 1 for success). If validation fails, an error message will unobtrusively show up and notify the user about the failed validation.
PHP-style (on the server), when the entire form is submitted. This is the usual validation you would do on the server, by checking user input against certain rules. If no errors are found and the input data is valid, the browser is redirected to a success page. If validation fails, however, the user is sent back to the form page with the invalid fields highlighted.
Nowadays everybody knows that javascript can be used to validate input data in HTML forms before sending off the content to a server. Despite of that, when there are many fields in the form, the JavaScript validation becomes too complex and boring to code. That’s why fValidator exists, with it form validations are many times easier.
There are a lot of non-jQuery-based solutions (which you’d avoid since you found jQuery) and some jQuery-based solutions. This particular one you are looking at is one of the oldest jQuery plugins (started in July 2006) and proved itself in projects all around the world. There is also an article discussing how this plugin fits the bill of the should-be validation solution.
The LiveValidation class sets up a text, checkbox, file, or password input, or a textarea to allow its value to be validated in real-time based upon the validations you assign to it.
JSValidate is a form validator that uses prototype and scriptaculous to bring you a very easy Javascript form validator.
Field validation with Prototype
A robust Javascript form validation library built with prototype and scriptaculous. It has a number of tests built-in but is extensible to include your custom validation checks.
This Validator works fairly well. It is very easy to implement with Dreamweaver CS3. If you are not using Dreamweaver than you can download their Javascript elements.
Clean Form Validation is a very simple Javascript form validation and it is very easy to implement.
In the sForm case, to let users know what’s happening, incorrect fields are going to be red after validation and correct fields will turn green. An image will be added after each validation to express by visualization the fields correctness.
Gregphoto Ajax Form Validation
There are several benefits to this approach. Allows you to perform complex validation, such as verifying the uniqueness of a username, or checking something in the database…all without reloading the page. Allows you to use the same validation routine for both client-side validation and server-side validation. Reduces the amount of client-side code needed for validation.
ASP AJAX Form Processing And Validation
Using AJAX to validate forms has many advantages. The form is protected at server level – yet the client has ‘immediate’ feedback. Form fields are not wiped on post back – reducing user frustration.
This is a masked input plugin for the jQuery javascript library. It allows a user to more easily enter fixed width input where you would like them to enter the data in a certain format (dates,phone numbers, etc). A mask is defined by a format made up of mask literals and mask definitions. Any character not in the definitions list below is considered a mask literal. Mask literals will be automatically entered for the user as they type and will not be able to be removed by the user. The following mask definitions are predefined:
- a – Represents an alpha character (A-Z,a-z)
- 9 – Represents a numeric character (0-9)
- * – Represents an alphanumeric character (A-Z,a-z,0-9)
This one will show how to perform server side validations even when complex scenarios arise, while avoiding post backs. It can be used as a centralized validation component, which can perform all validations for an ASP.NET web site.
For help, advice, tips and tricks, challenges, feel free to visit our
or Submit your good resource to share.
Reminder: Unless stated otherwise, all resources published on this site are NOT for commercial use. To use any resource from this site for commercial purposes, please contact the author.


[...] previous posts like The Ultimate Collection of AJAX Form Validation Plugins (Controls) or AJAX Search: Save Time, Save Money, we have introduced some APIs and plugins, in fact there are [...]
[...] same as FORM(@see The Ultimate Collection of AJAX Form Validation Plugins (Controls) ), TABLE is a very important element in web development and tables in html do have great [...]