Settings for enclosing the fieldname
Clientside validation on create page

This module adds clientside validation (aka "Ajax form validation") for all forms and webforms using jquery.validate. The included jquery.validate.js file is patched because we needed to be able to hide empty messages.

#D8CX: I pledge that clientside_validation will have a full Drupal 8 release on the day that Drupal 8 is released.

Example

If you want to try out an example of clientside validation in combination with the form API, FAPI Validation and/or Vertical Tabs (D6: http://www.drupal.org/project/vertical_tabs, D7: in core) you can download and enable the example module from this sandbox project:

http://drupal.org/sandbox/jelles/1193994 or http://drupal.org/project/1193994/git-instructions (direct link to git instructions tab)

Demo

Status

  • Validation is added to all forms and webforms (only tested with version 3).
  • The error messages are displayed the same way as without this module, in a div above the form.
  • The error messages use the same css classes as drupal does out of the box, so you only have to theme it once.
  • Supports the following conditions: Fields that
    • are required
    • have a maximum length
    • must have one of specified extensions
    • must be one of the allowed values
    • can only contain max x elements (checkboxes, multiple selects)
    • must contain minimum x elements (checkboxes, multiple selects)
    • must be greater than a minimum value
    • must be smaller than a maximum value
    • must be a number
    • must be a decimal
    • must equal an other field
    • can not equal an other field
    • must equal a specific value
    • must be an ean number
    • must match a POSIX regex
    • must match a PCRE regex
    • must be a valid e-mail address
    • must be a valid url
    • must be alpha (FAPI validation)
    • must be alphanumeric (FAPI validation)
    • must be valid IPv4 (FAPI validation)
    • must be "alpha dash" (FAPI validation)

    Note: The FAPI validation rules come down to matching a PCRE regex

  • CCK/Fields: textfield, textarea, decimal, float, integer, file and image
  • Supports most of CCK Date
  • Supports multiple forms on one page
  • Added support for Webform Validation
  • Added support for FAPI Validation
  • D7: Added support for Field Validation
  • D7: Added support for References
  • D6: Added support for node and user reference (CCK)
  • Added support for Vertical Tabs (for D6: Vertical Tabs)
  • Added an option to enclose the field name in quotes (defaults to nothing)
  • Added an option to validate all tabs or only the visible one (defaults to all tabs)
  • Added an option to specify on which forms to validate all fields (including those hidden) and on which forms only to validate the visible fields (defaults to only visible)
  • Added an option to specify on which forms to add Clientside Validation (defaults to all forms)
  • Added an option to specify whether or not to use the minified version of jquery.validate.js (defaults to not)
  • Checkboxes are working
  • Now using jquery.validate 1.9
  • Supports multi page webforms, build-in ones and Webform ajax page module
  • Support added for HTML5 elements, see this issue for more details
  • Added settings to control position and behaviour of the error messages
  • Added theming function for the error messages
  • Allow user to select to which forms the validation has to be added

Documentation

Author

The author can be contacted for paid customizations of this module as well as Drupal consulting and development.

Donate

Project Information

Downloads

Recommended releases

Version Downloads Date Links
7.x-1.25 tar.gz (60.79 KB) | zip (70.29 KB) 2011-Nov-29 Notes
6.x-1.24 tar.gz (64.1 KB) | zip (70.45 KB) 2011-Nov-29 Notes

Development releases


Maintainers for Clientside Validation

  • Jelle_S - 153 commits
    last: 1 day ago, first: 41 weeks ago
  • attiks - 56 commits
    last: 14 weeks ago, first: 1 year ago

Issues for Clientside Validation

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports
Oldest open issue: 19 Aug 10
nobody click here