jquery.controls (beta)

jquery.controls (beta) was written to help expedite the tedious task of validating forms client side. With jquery.controls:

  • You do not have to tell it which form/s to validate. The plugin will figure it out.
  • You can work with either CLASS or ID attributes.
  • You can validate emails.
  • You can validate numeric input (or non-numeric).
  • You can make certain the user does not enter some pre-determined value.
  • You can make certain the values of two fields match.
  • You can pass in any valid JavaScript regular expression. (Useful for validating dates, credit card numbers, etc.)
  • You can apply a maxlength to textareas and specify a “# remaining” status box.
  • You can validate a group of radio buttons by CLASS or ID attribute.
  • You can make certain the user selects at least one checkbox from any number of checkboxes within a container element.
  • You can supply your own error messages or use the defaults.
  • You can style the error messages however you like, or hook it into another plugin, for instance a tooltip or alertbox plugin.

All you have to do is place the rules of validation within hidden tags. These rules have been kept simple so you can usually just copy and paste from the demos. The code has been thoroughly commented so that suggested improvements can be made.