README.txt 8.06 KB
Newer Older
Jelle Sebreghts's avatar
Jelle Sebreghts committed
1
DESCRIPTION
Peter Droogmans's avatar
Peter Droogmans committed
2
===========
Jelle Sebreghts's avatar
Jelle Sebreghts committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
  This module adds clientside validation for all forms and webforms using
  jquery.validate[1]. The included jquery.validate.js file is patched because we
  needed to be able to hide empty messages.

EXAMPLE
=======
  If you want to try out an example of Clientside Validation in combination with
  the form API, FAPI Validation (http://www.drupal.org/project/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
====
  Demo's can be a little bit outdated
  Drupal 6:
    * Custom form: http://atix.be/cv6a
    * Webform: http://atix.be/cv6b
  Drupal 7:
    * Custom form: http://atix.be/cv7a
    * Webform: http://atix.be/cv7b

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: textfield, textarea, decimal, float, integer, file and image
  * Supports multiple forms on one page
  * Added support for Webform Validation
  * Added support for FAPI Validation
  * D7: Added support for Field Validation
  * Added support for Vertical Tabs (for D6: Vertical Tabs)
  * Supports most of CCK Date
  * 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
  * Checkboxes are working
  * Now using jquery.validate 1.8
  * Supports multi page webforms
Peter Droogmans's avatar
Peter Droogmans committed
79

Jelle Sebreghts's avatar
Jelle Sebreghts committed
80 81 82 83 84
TODO
====
  * Add settings to control position and behaviour of the error messages

USAGE
85
=====
Jelle Sebreghts's avatar
Jelle Sebreghts committed
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
  The only thing this module will do is translate validation rules defined in
  PHP to javascript counter parts, if you mark a field as required it will
  create a javascript rule that checks the field on submit. This means no real
  configuration is needed. You can however configure the prefix and suffix used
  for the field names in the error messages (e.g.: prefix:", suffix:" or
  prefix:<<, suffix:>>), whether or not to use the minified version of
  jquery.validate.js, whether or not to validate hidden fields on specific
  forms, whether or not to validate all vertical tabs or only the visible one
  and to add Clientside Validation to all forms or only to those specified.

AUTHOR
======
  The author can be contacted for paid customizations of this module as well as
  Drupal consulting and development.DESCRIPTION
===========
  This module adds clientside validation for all forms and webforms using
  jquery.validate[1]. The included jquery.validate.js file is patched because we
  needed to be able to hide empty messages.

EXAMPLE
=======
  If you want to try out an example of Clientside Validation in combination with
  the form API, FAPI Validation (http://www.drupal.org/project/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
====
  Demo's can be a little bit outdated
  Drupal 6:
    * Custom form: http://atix.be/cv6a
    * Webform: http://atix.be/cv6b
  Drupal 7:
    * Custom form: http://atix.be/cv7a
    * Webform: http://atix.be/cv7b

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: textfield, textarea, decimal, float, integer, file and image
  * Supports multiple forms on one page
  * Added support for Webform Validation
  * Added support for FAPI Validation
  * D7: Added support for Field Validation
  * Added support for Vertical Tabs (for D6: Vertical Tabs)
  * Supports most of CCK Date
  * 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.8
  * Supports multi page webforms
Peter Droogmans's avatar
Peter Droogmans committed
177

178 179
TODO
====
Jelle Sebreghts's avatar
Jelle Sebreghts committed
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
  * Add settings to control position and behaviour of the error messages

USAGE
=====
  The only thing this module will do is translate validation rules defined in
  PHP to javascript counter parts, if you mark a field as required it will
  create a javascript rule that checks the field on submit. This means no real
  configuration is needed. You can however configure the prefix and suffix used
  for the field names in the error messages (e.g.: prefix:", suffix:" or
  prefix:<<, suffix:>>), whether or not to use the minified version of
  jquery.validate.js, whether or not to validate hidden fields on specific
  forms, whether or not to validate all vertical tabs or only the visible one
  and to add Clientside Validation to all forms or only to those specified.

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