Recently I have been developing form validation in JavaScript. Due to the development environment I have learned some new techniques that I am fine tuning in my validation process.
Here are my requirements for this JavaScript to work:
- Reusable across multiple forms.
- No bloat, bandwidth intensive or memory hogging.
- Easy to implement.
- Not required for the site to operate but allow for required fields.
These are features I would like to use or see:
- It should be able to customize on-the-fly dialog for messages.
- It would be nice to have “skinable” dialog for multiple languages or use the same validation for mutliple locations.
- Multiple case scenarios adding custom cases or ability to add “modular” (plug-in) abilities for validation.
The goal is to have an optimized solution that uses reusable elements to eliminate the need of creating client side validation scripts again and again for each project. In short I want a flexible JavaScript form validator. And since I won’t be able to use any of this in my day job I think I will give you a free shot of form validation. Please post your own methods and uses I would love to have variations and thoughts on these methods.
Preperation
The usability is often determined by a good information architecture, clear and intuitive visual design and well designed functionality. One of the main arguments to enhance markup using unobtrusive JavaScript is to improve the usability of a Web page by supporting these usability attributes. This attempt of this script will be to enhance the usability of a Web page by allowing the form designer to not worry about the script rather the layout and presentation to the end user.
I would love to see this done without any frameworks used however - if one must - I will accept jQuery, Prototype or any other major JS framework freely available.