databaseformalizer 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (267) hide show
  1. data/.project +18 -0
  2. data/README +256 -0
  3. data/README.md +2 -0
  4. data/Rakefile +21 -0
  5. data/app/controllers/databaseformalizer/attr_defs_controller.rb +98 -0
  6. data/app/controllers/databaseformalizer/attr_vals_controller.rb +85 -0
  7. data/app/controllers/databaseformalizer/dbformahome_controller.rb +7 -0
  8. data/app/controllers/databaseformalizer/entities_controller.rb +105 -0
  9. data/app/controllers/databaseformalizer/entity_defs_controller.rb +90 -0
  10. data/app/helpers/application_helper.rb +2 -0
  11. data/app/helpers/databaseformalizer/application_helper.rb +4 -0
  12. data/app/helpers/databaseformalizer/attr_defs_helper.rb +4 -0
  13. data/app/helpers/databaseformalizer/attr_vals_helper.rb +4 -0
  14. data/app/helpers/databaseformalizer/dbformahome_helper.rb +4 -0
  15. data/app/helpers/databaseformalizer/entities_helper.rb +160 -0
  16. data/app/helpers/databaseformalizer/entity_defs_helper.rb +68 -0
  17. data/app/models/databaseformalizer/attr_def.rb +48 -0
  18. data/app/models/databaseformalizer/attr_list_join_def.rb +17 -0
  19. data/app/models/databaseformalizer/attr_list_join_val.rb +18 -0
  20. data/app/models/databaseformalizer/attr_val.rb +36 -0
  21. data/app/models/databaseformalizer/attr_vals_entity.rb +18 -0
  22. data/app/models/databaseformalizer/entity.rb +27 -0
  23. data/app/models/databaseformalizer/entity_def.rb +24 -0
  24. data/app/models/databaseformalizer/entity_def_attr_def.rb +18 -0
  25. data/app/views/databaseformalizer/attr_defs/_form.html.erb +74 -0
  26. data/app/views/databaseformalizer/attr_defs/edit.html.erb +7 -0
  27. data/app/views/databaseformalizer/attr_defs/index.html.erb +38 -0
  28. data/app/views/databaseformalizer/attr_defs/new.html.erb +6 -0
  29. data/app/views/databaseformalizer/attr_defs/show.html.erb +50 -0
  30. data/app/views/databaseformalizer/attr_vals/_form.html.erb +29 -0
  31. data/app/views/databaseformalizer/attr_vals/edit.html.erb +7 -0
  32. data/app/views/databaseformalizer/attr_vals/index.html.erb +28 -0
  33. data/app/views/databaseformalizer/attr_vals/new.html.erb +6 -0
  34. data/app/views/databaseformalizer/attr_vals/show.html.erb +20 -0
  35. data/app/views/databaseformalizer/dbformahome/index.html.erb +19 -0
  36. data/app/views/databaseformalizer/entities/_attr_val_boolean_form.html.erb +7 -0
  37. data/app/views/databaseformalizer/entities/_attr_val_checkList_form.html.erb +22 -0
  38. data/app/views/databaseformalizer/entities/_attr_val_datetime_form.html.erb +15 -0
  39. data/app/views/databaseformalizer/entities/_attr_val_entityDef_form.html.erb +14 -0
  40. data/app/views/databaseformalizer/entities/_attr_val_form_all.html.erb +4 -0
  41. data/app/views/databaseformalizer/entities/_attr_val_form_one.html.erb +6 -0
  42. data/app/views/databaseformalizer/entities/_attr_val_integer_form.html.erb +10 -0
  43. data/app/views/databaseformalizer/entities/_attr_val_openList_element_form.html.erb +16 -0
  44. data/app/views/databaseformalizer/entities/_attr_val_openList_form.html.erb +12 -0
  45. data/app/views/databaseformalizer/entities/_attr_val_selectOneInList_form.html.erb +20 -0
  46. data/app/views/databaseformalizer/entities/_attr_val_string_form.html.erb +10 -0
  47. data/app/views/databaseformalizer/entities/_attr_val_text_form.html.erb +10 -0
  48. data/app/views/databaseformalizer/entities/_form.html.erb +54 -0
  49. data/app/views/databaseformalizer/entities/edit.html.erb +8 -0
  50. data/app/views/databaseformalizer/entities/index.html.erb +45 -0
  51. data/app/views/databaseformalizer/entities/new.html.erb +10 -0
  52. data/app/views/databaseformalizer/entities/new.js.erb +1 -0
  53. data/app/views/databaseformalizer/entities/show.html.erb +50 -0
  54. data/app/views/databaseformalizer/entity_defs/_form.html.erb +51 -0
  55. data/app/views/databaseformalizer/entity_defs/edit.html.erb +7 -0
  56. data/app/views/databaseformalizer/entity_defs/index.html.erb +57 -0
  57. data/app/views/databaseformalizer/entity_defs/new.html.erb +6 -0
  58. data/app/views/databaseformalizer/entity_defs/show.html.erb +30 -0
  59. data/app/views/databaseformalizer/layouts/application.html.erb +134 -0
  60. data/databaseformalizer.gemspec +34 -0
  61. data/lib/acts_as_entity/base.rb +101 -0
  62. data/lib/application_controller.rb +21 -0
  63. data/lib/application_helper.rb +3 -0
  64. data/lib/databaseformalizer.rb +27 -0
  65. data/lib/engine.rb +23 -0
  66. data/lib/generators/entity_def/USAGE +8 -0
  67. data/lib/generators/entity_def/entity_def_generator.rb +39 -0
  68. data/lib/generators/entity_def/templates/controller.rb +98 -0
  69. data/lib/generators/entity_def/templates/helper.rb +2 -0
  70. data/lib/generators/entity_def/templates/model.rb +3 -0
  71. data/lib/generators/entity_def/templates/view/_form.html.erb +35 -0
  72. data/lib/generators/entity_def/templates/view/edit.html.erb +6 -0
  73. data/lib/generators/entity_def/templates/view/index.html.erb +27 -0
  74. data/lib/generators/entity_def/templates/view/new.html.erb +5 -0
  75. data/lib/generators/entity_def/templates/view/show.html.erb +3 -0
  76. data/lib/rails/generators/databaseformalizer/databaseformalizer_generator.rb +52 -0
  77. data/lib/rails/generators/databaseformalizer/templates/initializer.rb +8 -0
  78. data/lib/rails/generators/databaseformalizer/templates/migration.rb +9 -0
  79. data/lib/rails/generators/databaseformalizer/templates/migration.rb.bak +9 -0
  80. data/lib/rails/generators/databaseformalizer/templates/schema.rb +84 -0
  81. data/lib/rails/railties/tasks.rake +8 -0
  82. data/public/bootstrap/css/bootstrap-fixed-header.css +15 -0
  83. data/public/bootstrap/css/bootstrap-responsive.css +808 -0
  84. data/public/bootstrap/css/bootstrap-responsive.min.css +9 -0
  85. data/public/bootstrap/css/bootstrap-toggle.css +242 -0
  86. data/public/bootstrap/css/cerulean/bootstrap.min.css +740 -0
  87. data/public/bootstrap/css/img/glyphicons-halflings-white.png +0 -0
  88. data/public/bootstrap/css/img/glyphicons-halflings.png +0 -0
  89. data/public/bootstrap/js/bootstrap-alert.js +90 -0
  90. data/public/bootstrap/js/bootstrap-collapse.js +157 -0
  91. data/public/bootstrap/js/bootstrap-dropdown.js +100 -0
  92. data/public/bootstrap/js/bootstrap-fixed-header.js +54 -0
  93. data/public/bootstrap/js/bootstrap-modal.js +218 -0
  94. data/public/bootstrap/js/bootstrap-popover.js +98 -0
  95. data/public/bootstrap/js/bootstrap-tab.js +135 -0
  96. data/public/bootstrap/js/bootstrap-toggle.js +104 -0
  97. data/public/bootstrap/js/bootstrap-tooltip.js +275 -0
  98. data/public/bootstrap/js/bootstrap-transition.js +61 -0
  99. data/public/bootstrap/js/bootstrap.js +1824 -0
  100. data/public/bootstrap/js/bootstrap.min.js +6 -0
  101. data/public/images/Thumbs.db +0 -0
  102. data/public/images/bootstrap/Thumbs.db +0 -0
  103. data/public/images/bootstrap/glyphicons-halflings.png +0 -0
  104. data/public/images/databaseformalizer.jpg +0 -0
  105. data/public/images/metamodel.png +0 -0
  106. data/public/images/model.png +0 -0
  107. data/public/javascripts/databaseformalizer.js +13 -0
  108. data/public/javascripts/jquery.js +9252 -0
  109. data/public/jquery-ui/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  110. data/public/jquery-ui/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  111. data/public/jquery-ui/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
  112. data/public/jquery-ui/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  113. data/public/jquery-ui/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  114. data/public/jquery-ui/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  115. data/public/jquery-ui/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  116. data/public/jquery-ui/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  117. data/public/jquery-ui/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  118. data/public/jquery-ui/css/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
  119. data/public/jquery-ui/css/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
  120. data/public/jquery-ui/css/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
  121. data/public/jquery-ui/css/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
  122. data/public/jquery-ui/css/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
  123. data/public/jquery-ui/css/ui-lightness/jquery-ui-1.8.21.custom.css +565 -0
  124. data/public/jquery-ui/js/jquery-1.7.2.min.js +4 -0
  125. data/public/jquery-ui/js/jquery-ui-1.8.21.custom.min.js +125 -0
  126. data/public/jquery-validation/README.md +8 -0
  127. data/public/jquery-validation/additional-methods.js +300 -0
  128. data/public/jquery-validation/additional-methods.min.js +29 -0
  129. data/public/jquery-validation/changelog.txt +277 -0
  130. data/public/jquery-validation/jquery.validate.js +1188 -0
  131. data/public/jquery-validation/jquery.validate.min.js +51 -0
  132. data/public/jquery-validation/lib/jquery-1.3.2.js +4376 -0
  133. data/public/jquery-validation/lib/jquery-1.4.2.js +6240 -0
  134. data/public/jquery-validation/lib/jquery-1.4.4.js +7179 -0
  135. data/public/jquery-validation/lib/jquery-1.5.2.js +8374 -0
  136. data/public/jquery-validation/lib/jquery-1.6.1.js +8936 -0
  137. data/public/jquery-validation/lib/jquery.form.js +660 -0
  138. data/public/jquery-validation/lib/jquery.js +4376 -0
  139. data/public/jquery-validation/lib/jquery.metadata.js +122 -0
  140. data/public/jquery-validation/lib/jquery.mockjax.js +382 -0
  141. data/public/jquery-validation/localization/messages_ar.js +24 -0
  142. data/public/jquery-validation/localization/messages_bg.js +23 -0
  143. data/public/jquery-validation/localization/messages_ca.js +23 -0
  144. data/public/jquery-validation/localization/messages_cn.js +23 -0
  145. data/public/jquery-validation/localization/messages_cs.js +23 -0
  146. data/public/jquery-validation/localization/messages_da.js +20 -0
  147. data/public/jquery-validation/localization/messages_de.js +20 -0
  148. data/public/jquery-validation/localization/messages_el.js +24 -0
  149. data/public/jquery-validation/localization/messages_es.js +23 -0
  150. data/public/jquery-validation/localization/messages_eu.js +23 -0
  151. data/public/jquery-validation/localization/messages_fa.js +23 -0
  152. data/public/jquery-validation/localization/messages_fi.js +21 -0
  153. data/public/jquery-validation/localization/messages_fr.js +23 -0
  154. data/public/jquery-validation/localization/messages_ge.js +23 -0
  155. data/public/jquery-validation/localization/messages_he.js +23 -0
  156. data/public/jquery-validation/localization/messages_hu.js +20 -0
  157. data/public/jquery-validation/localization/messages_it.js +23 -0
  158. data/public/jquery-validation/localization/messages_ja.js +23 -0
  159. data/public/jquery-validation/localization/messages_kk.js +23 -0
  160. data/public/jquery-validation/localization/messages_lt.js +23 -0
  161. data/public/jquery-validation/localization/messages_lv.js +23 -0
  162. data/public/jquery-validation/localization/messages_nl.js +23 -0
  163. data/public/jquery-validation/localization/messages_no.js +23 -0
  164. data/public/jquery-validation/localization/messages_pl.js +23 -0
  165. data/public/jquery-validation/localization/messages_ptbr.js +23 -0
  166. data/public/jquery-validation/localization/messages_ptpt.js +23 -0
  167. data/public/jquery-validation/localization/messages_ro.js +23 -0
  168. data/public/jquery-validation/localization/messages_ru.js +23 -0
  169. data/public/jquery-validation/localization/messages_se.js +21 -0
  170. data/public/jquery-validation/localization/messages_si.js +23 -0
  171. data/public/jquery-validation/localization/messages_sk.js +20 -0
  172. data/public/jquery-validation/localization/messages_sl.js +23 -0
  173. data/public/jquery-validation/localization/messages_sr.js +23 -0
  174. data/public/jquery-validation/localization/messages_th.js +23 -0
  175. data/public/jquery-validation/localization/messages_tr.js +23 -0
  176. data/public/jquery-validation/localization/messages_tw.js +23 -0
  177. data/public/jquery-validation/localization/messages_ua.js +23 -0
  178. data/public/jquery-validation/localization/messages_vi.js +23 -0
  179. data/public/jquery-validation/localization/methods_de.js +12 -0
  180. data/public/jquery-validation/localization/methods_nl.js +9 -0
  181. data/public/jquery-validation/localization/methods_pt.js +9 -0
  182. data/public/jquery-validation/todo +172 -0
  183. data/public/jquery-validation/version.txt +1 -0
  184. data/public/stylesheets/databaseformalizer.css +64 -0
  185. data/public/stylesheets/scaffold.css +56 -0
  186. data/public/tablesorter/addons/.svn/all-wcprops +5 -0
  187. data/public/tablesorter/addons/.svn/entries +31 -0
  188. data/public/tablesorter/addons/pager/.svn/all-wcprops +17 -0
  189. data/public/tablesorter/addons/pager/.svn/entries +96 -0
  190. data/public/tablesorter/addons/pager/.svn/prop-base/jquery.tablesorter.pager.css.svn-base +5 -0
  191. data/public/tablesorter/addons/pager/.svn/prop-base/jquery.tablesorter.pager.js.svn-base +5 -0
  192. data/public/tablesorter/addons/pager/.svn/text-base/jquery.tablesorter.pager.css.svn-base +25 -0
  193. data/public/tablesorter/addons/pager/.svn/text-base/jquery.tablesorter.pager.js.svn-base +184 -0
  194. data/public/tablesorter/addons/pager/jquery.tablesorter.pager.css +25 -0
  195. data/public/tablesorter/addons/pager/jquery.tablesorter.pager.js +184 -0
  196. data/public/tablesorter/build/.svn/all-wcprops +47 -0
  197. data/public/tablesorter/build/.svn/entries +266 -0
  198. data/public/tablesorter/build/.svn/prop-base/ParseMaster.js.svn-base +5 -0
  199. data/public/tablesorter/build/.svn/prop-base/js.jar.svn-base +5 -0
  200. data/public/tablesorter/build/.svn/prop-base/jsmin.js.svn-base +5 -0
  201. data/public/tablesorter/build/.svn/prop-base/min.js.svn-base +5 -0
  202. data/public/tablesorter/build/.svn/prop-base/pack.js.svn-base +5 -0
  203. data/public/tablesorter/build/.svn/prop-base/packer.js.svn-base +5 -0
  204. data/public/tablesorter/build/.svn/prop-base/writeFile.js.svn-base +5 -0
  205. data/public/tablesorter/build/.svn/text-base/ParseMaster.js.svn-base +106 -0
  206. data/public/tablesorter/build/.svn/text-base/js.jar.svn-base +0 -0
  207. data/public/tablesorter/build/.svn/text-base/jsmin.js.svn-base +316 -0
  208. data/public/tablesorter/build/.svn/text-base/min.js.svn-base +5 -0
  209. data/public/tablesorter/build/.svn/text-base/pack.js.svn-base +5 -0
  210. data/public/tablesorter/build/.svn/text-base/packer.js.svn-base +316 -0
  211. data/public/tablesorter/build/.svn/text-base/writeFile.js.svn-base +19 -0
  212. data/public/tablesorter/build/ParseMaster.js +106 -0
  213. data/public/tablesorter/build/js.jar +0 -0
  214. data/public/tablesorter/build/jsmin.js +316 -0
  215. data/public/tablesorter/build/min.js +5 -0
  216. data/public/tablesorter/build/pack.js +5 -0
  217. data/public/tablesorter/build/packer.js +316 -0
  218. data/public/tablesorter/build/writeFile.js +19 -0
  219. data/public/tablesorter/build.xml +26 -0
  220. data/public/tablesorter/changelog +41 -0
  221. data/public/tablesorter/jquery-latest.js +154 -0
  222. data/public/tablesorter/jquery.metadata.js +122 -0
  223. data/public/tablesorter/jquery.tablesorter.js +1031 -0
  224. data/public/tablesorter/jquery.tablesorter.min.js +4 -0
  225. data/public/tablesorter/jquery.tablesorter.widgets.js +433 -0
  226. data/public/tablesorter/jquery.ui.datepicker.js +1727 -0
  227. data/public/tablesorter/style.css +110 -0
  228. data/public/tablesorter/themes/.svn/all-wcprops +5 -0
  229. data/public/tablesorter/themes/.svn/entries +34 -0
  230. data/public/tablesorter/themes/blue/.svn/all-wcprops +35 -0
  231. data/public/tablesorter/themes/blue/.svn/entries +198 -0
  232. data/public/tablesorter/themes/blue/.svn/prop-base/asc.gif.svn-base +5 -0
  233. data/public/tablesorter/themes/blue/.svn/prop-base/bg.gif.svn-base +5 -0
  234. data/public/tablesorter/themes/blue/.svn/prop-base/blue.zip.svn-base +5 -0
  235. data/public/tablesorter/themes/blue/.svn/prop-base/desc.gif.svn-base +5 -0
  236. data/public/tablesorter/themes/blue/.svn/prop-base/style.css.svn-base +5 -0
  237. data/public/tablesorter/themes/blue/.svn/text-base/asc.gif.svn-base +0 -0
  238. data/public/tablesorter/themes/blue/.svn/text-base/bg.gif.svn-base +0 -0
  239. data/public/tablesorter/themes/blue/.svn/text-base/blue.zip.svn-base +0 -0
  240. data/public/tablesorter/themes/blue/.svn/text-base/desc.gif.svn-base +0 -0
  241. data/public/tablesorter/themes/blue/.svn/text-base/style.css.svn-base +39 -0
  242. data/public/tablesorter/themes/blue/asc.gif +0 -0
  243. data/public/tablesorter/themes/blue/bg.gif +0 -0
  244. data/public/tablesorter/themes/blue/blue.zip +0 -0
  245. data/public/tablesorter/themes/blue/desc.gif +0 -0
  246. data/public/tablesorter/themes/blue/style.css +39 -0
  247. data/public/tablesorter/themes/green/.svn/all-wcprops +35 -0
  248. data/public/tablesorter/themes/green/.svn/entries +198 -0
  249. data/public/tablesorter/themes/green/.svn/prop-base/asc.png.svn-base +5 -0
  250. data/public/tablesorter/themes/green/.svn/prop-base/bg.png.svn-base +5 -0
  251. data/public/tablesorter/themes/green/.svn/prop-base/desc.png.svn-base +5 -0
  252. data/public/tablesorter/themes/green/.svn/prop-base/green.zip.svn-base +5 -0
  253. data/public/tablesorter/themes/green/.svn/prop-base/style.css.svn-base +5 -0
  254. data/public/tablesorter/themes/green/.svn/text-base/asc.png.svn-base +0 -0
  255. data/public/tablesorter/themes/green/.svn/text-base/bg.png.svn-base +0 -0
  256. data/public/tablesorter/themes/green/.svn/text-base/desc.png.svn-base +0 -0
  257. data/public/tablesorter/themes/green/.svn/text-base/green.zip.svn-base +0 -0
  258. data/public/tablesorter/themes/green/.svn/text-base/style.css.svn-base +39 -0
  259. data/public/tablesorter/themes/green/asc.png +0 -0
  260. data/public/tablesorter/themes/green/bg.png +0 -0
  261. data/public/tablesorter/themes/green/desc.png +0 -0
  262. data/public/tablesorter/themes/green/green.zip +0 -0
  263. data/public/tablesorter/themes/green/style.css +39 -0
  264. data/test/database.yml +5 -0
  265. data/test/test_helper.rb +56 -0
  266. data/test/unit/databaseformalizer_test.rb +11 -0
  267. metadata +332 -0
@@ -0,0 +1,8 @@
1
+ [jQuery Validation Plugin](http://bassistance.de/jquery-plugins/jquery-plugin-validation/) - Form validation made easy
2
+ ================================
3
+
4
+ The jQuery Validation Plugin provides drop-in validation for your existing forms, while making all kinds of customizations to fit your application really easy.
5
+
6
+ If you've wrote custom methods that you'd like to contribute to additional-methods.js, create a branch, add the method there and send a pull request for that branch.
7
+
8
+ If you've wrote a patch for some bug listed on http://plugins.jquery.com/project/issues/validate, please provide a link to that issue in your commit message.
@@ -0,0 +1,300 @@
1
+ /**
2
+ * jQuery Validation Plugin 1.9.0
3
+ *
4
+ * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
5
+ * http://docs.jquery.com/Plugins/Validation
6
+ *
7
+ * Copyright (c) 2006 - 2011 Jörn Zaefferer
8
+ *
9
+ * Dual licensed under the MIT and GPL licenses:
10
+ * http://www.opensource.org/licenses/mit-license.php
11
+ * http://www.gnu.org/licenses/gpl.html
12
+ */
13
+
14
+ (function() {
15
+
16
+ function stripHtml(value) {
17
+ // remove html tags and space chars
18
+ return value.replace(/<.[^<>]*?>/g, ' ').replace(/&nbsp;|&#160;/gi, ' ')
19
+ // remove numbers and punctuation
20
+ .replace(/[0-9.(),;:!?%#$'"_+=\/-]*/g,'');
21
+ }
22
+ jQuery.validator.addMethod("maxWords", function(value, element, params) {
23
+ return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length < params;
24
+ }, jQuery.validator.format("Please enter {0} words or less."));
25
+
26
+ jQuery.validator.addMethod("minWords", function(value, element, params) {
27
+ return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params;
28
+ }, jQuery.validator.format("Please enter at least {0} words."));
29
+
30
+ jQuery.validator.addMethod("rangeWords", function(value, element, params) {
31
+ return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params[0] && value.match(/bw+b/g).length < params[1];
32
+ }, jQuery.validator.format("Please enter between {0} and {1} words."));
33
+
34
+ })();
35
+
36
+ jQuery.validator.addMethod("letterswithbasicpunc", function(value, element) {
37
+ return this.optional(element) || /^[a-z-.,()'\"\s]+$/i.test(value);
38
+ }, "Letters or punctuation only please");
39
+
40
+ jQuery.validator.addMethod("alphanumeric", function(value, element) {
41
+ return this.optional(element) || /^\w+$/i.test(value);
42
+ }, "Letters, numbers, spaces or underscores only please");
43
+
44
+ jQuery.validator.addMethod("lettersonly", function(value, element) {
45
+ return this.optional(element) || /^[a-z]+$/i.test(value);
46
+ }, "Letters only please");
47
+
48
+ jQuery.validator.addMethod("nowhitespace", function(value, element) {
49
+ return this.optional(element) || /^\S+$/i.test(value);
50
+ }, "No white space please");
51
+
52
+ jQuery.validator.addMethod("ziprange", function(value, element) {
53
+ return this.optional(element) || /^90[2-5]\d\{2}-\d{4}$/.test(value);
54
+ }, "Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx");
55
+
56
+ jQuery.validator.addMethod("integer", function(value, element) {
57
+ return this.optional(element) || /^-?\d+$/.test(value);
58
+ }, "A positive or negative non-decimal number please");
59
+
60
+ /**
61
+ * Return true, if the value is a valid vehicle identification number (VIN).
62
+ *
63
+ * Works with all kind of text inputs.
64
+ *
65
+ * @example <input type="text" size="20" name="VehicleID" class="{required:true,vinUS:true}" />
66
+ * @desc Declares a required input element whose value must be a valid vehicle identification number.
67
+ *
68
+ * @name jQuery.validator.methods.vinUS
69
+ * @type Boolean
70
+ * @cat Plugins/Validate/Methods
71
+ */
72
+ jQuery.validator.addMethod(
73
+ "vinUS",
74
+ function(v){
75
+ if (v.length != 17)
76
+ return false;
77
+ var i, n, d, f, cd, cdv;
78
+ var LL = ["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"];
79
+ var VL = [1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9];
80
+ var FL = [8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2];
81
+ var rs = 0;
82
+ for(i = 0; i < 17; i++){
83
+ f = FL[i];
84
+ d = v.slice(i,i+1);
85
+ if(i == 8){
86
+ cdv = d;
87
+ }
88
+ if(!isNaN(d)){
89
+ d *= f;
90
+ }
91
+ else{
92
+ for(n = 0; n < LL.length; n++){
93
+ if(d.toUpperCase() === LL[n]){
94
+ d = VL[n];
95
+ d *= f;
96
+ if(isNaN(cdv) && n == 8){
97
+ cdv = LL[n];
98
+ }
99
+ break;
100
+ }
101
+ }
102
+ }
103
+ rs += d;
104
+ }
105
+ cd = rs % 11;
106
+ if(cd == 10){cd = "X";}
107
+ if(cd == cdv){return true;}
108
+ return false;
109
+ },
110
+ "The specified vehicle identification number (VIN) is invalid."
111
+ );
112
+
113
+ /**
114
+ * Return true, if the value is a valid date, also making this formal check dd/mm/yyyy.
115
+ *
116
+ * @example jQuery.validator.methods.date("01/01/1900")
117
+ * @result true
118
+ *
119
+ * @example jQuery.validator.methods.date("01/13/1990")
120
+ * @result false
121
+ *
122
+ * @example jQuery.validator.methods.date("01.01.1900")
123
+ * @result false
124
+ *
125
+ * @example <input name="pippo" class="{dateITA:true}" />
126
+ * @desc Declares an optional input element whose value must be a valid date.
127
+ *
128
+ * @name jQuery.validator.methods.dateITA
129
+ * @type Boolean
130
+ * @cat Plugins/Validate/Methods
131
+ */
132
+ jQuery.validator.addMethod(
133
+ "dateITA",
134
+ function(value, element) {
135
+ var check = false;
136
+ var re = /^\d{1,2}\/\d{1,2}\/\d{4}$/;
137
+ if( re.test(value)){
138
+ var adata = value.split('/');
139
+ var gg = parseInt(adata[0],10);
140
+ var mm = parseInt(adata[1],10);
141
+ var aaaa = parseInt(adata[2],10);
142
+ var xdata = new Date(aaaa,mm-1,gg);
143
+ if ( ( xdata.getFullYear() == aaaa ) && ( xdata.getMonth () == mm - 1 ) && ( xdata.getDate() == gg ) )
144
+ check = true;
145
+ else
146
+ check = false;
147
+ } else
148
+ check = false;
149
+ return this.optional(element) || check;
150
+ },
151
+ "Please enter a correct date"
152
+ );
153
+
154
+ jQuery.validator.addMethod("dateNL", function(value, element) {
155
+ return this.optional(element) || /^\d\d?[\.\/-]\d\d?[\.\/-]\d\d\d?\d?$/.test(value);
156
+ }, "Vul hier een geldige datum in."
157
+ );
158
+
159
+ jQuery.validator.addMethod("time", function(value, element) {
160
+ return this.optional(element) || /^([01]\d|2[0-3])(:[0-5]\d){0,2}$/.test(value);
161
+ }, "Please enter a valid time, between 00:00 and 23:59");
162
+ jQuery.validator.addMethod("time12h", function(value, element) {
163
+ return this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))$/i.test(value);
164
+ }, "Please enter a valid time, between 00:00 am and 12:00 pm");
165
+
166
+ /**
167
+ * matches US phone number format
168
+ *
169
+ * where the area code may not start with 1 and the prefix may not start with 1
170
+ * allows '-' or ' ' as a separator and allows parens around area code
171
+ * some people may want to put a '1' in front of their number
172
+ *
173
+ * 1(212)-999-2345
174
+ * or
175
+ * 212 999 2344
176
+ * or
177
+ * 212-999-0983
178
+ *
179
+ * but not
180
+ * 111-123-5434
181
+ * and not
182
+ * 212 123 4567
183
+ */
184
+ jQuery.validator.addMethod("phoneUS", function(phone_number, element) {
185
+ phone_number = phone_number.replace(/\s+/g, "");
186
+ return this.optional(element) || phone_number.length > 9 &&
187
+ phone_number.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/);
188
+ }, "Please specify a valid phone number");
189
+
190
+ jQuery.validator.addMethod('phoneUK', function(phone_number, element) {
191
+ return this.optional(element) || phone_number.length > 9 &&
192
+ phone_number.match(/^(\(?(0|\+44)[1-9]{1}\d{1,4}?\)?\s?\d{3,4}\s?\d{3,4})$/);
193
+ }, 'Please specify a valid phone number');
194
+
195
+ jQuery.validator.addMethod('mobileUK', function(phone_number, element) {
196
+ return this.optional(element) || phone_number.length > 9 &&
197
+ phone_number.match(/^((0|\+44)7(5|6|7|8|9){1}\d{2}\s?\d{6})$/);
198
+ }, 'Please specify a valid mobile number');
199
+
200
+ // TODO check if value starts with <, otherwise don't try stripping anything
201
+ jQuery.validator.addMethod("strippedminlength", function(value, element, param) {
202
+ return jQuery(value).text().length >= param;
203
+ }, jQuery.validator.format("Please enter at least {0} characters"));
204
+
205
+ // same as email, but TLD is optional
206
+ jQuery.validator.addMethod("email2", function(value, element, param) {
207
+ return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value);
208
+ }, jQuery.validator.messages.email);
209
+
210
+ // same as url, but TLD is optional
211
+ jQuery.validator.addMethod("url2", function(value, element, param) {
212
+ return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
213
+ }, jQuery.validator.messages.url);
214
+
215
+ // NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
216
+ // Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
217
+ // Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
218
+ jQuery.validator.addMethod("creditcardtypes", function(value, element, param) {
219
+
220
+ if (/[^0-9-]+/.test(value))
221
+ return false;
222
+
223
+ value = value.replace(/\D/g, "");
224
+
225
+ var validTypes = 0x0000;
226
+
227
+ if (param.mastercard)
228
+ validTypes |= 0x0001;
229
+ if (param.visa)
230
+ validTypes |= 0x0002;
231
+ if (param.amex)
232
+ validTypes |= 0x0004;
233
+ if (param.dinersclub)
234
+ validTypes |= 0x0008;
235
+ if (param.enroute)
236
+ validTypes |= 0x0010;
237
+ if (param.discover)
238
+ validTypes |= 0x0020;
239
+ if (param.jcb)
240
+ validTypes |= 0x0040;
241
+ if (param.unknown)
242
+ validTypes |= 0x0080;
243
+ if (param.all)
244
+ validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
245
+
246
+ if (validTypes & 0x0001 && /^(51|52|53|54|55)/.test(value)) { //mastercard
247
+ return value.length == 16;
248
+ }
249
+ if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa
250
+ return value.length == 16;
251
+ }
252
+ if (validTypes & 0x0004 && /^(34|37)/.test(value)) { //amex
253
+ return value.length == 15;
254
+ }
255
+ if (validTypes & 0x0008 && /^(300|301|302|303|304|305|36|38)/.test(value)) { //dinersclub
256
+ return value.length == 14;
257
+ }
258
+ if (validTypes & 0x0010 && /^(2014|2149)/.test(value)) { //enroute
259
+ return value.length == 15;
260
+ }
261
+ if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover
262
+ return value.length == 16;
263
+ }
264
+ if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb
265
+ return value.length == 16;
266
+ }
267
+ if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb
268
+ return value.length == 15;
269
+ }
270
+ if (validTypes & 0x0080) { //unknown
271
+ return true;
272
+ }
273
+ return false;
274
+ }, "Please enter a valid credit card number.");
275
+
276
+ jQuery.validator.addMethod("ipv4", function(value, element, param) {
277
+ return this.optional(element) || /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i.test(value);
278
+ }, "Please enter a valid IP v4 address.");
279
+
280
+ jQuery.validator.addMethod("ipv6", function(value, element, param) {
281
+ return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);
282
+ }, "Please enter a valid IP v6 address.");
283
+
284
+ /**
285
+ * Return true if the field value matches the given format RegExp
286
+ *
287
+ * @example jQuery.validator.methods.pattern("AR1004",element,/^AR\d{4}$/)
288
+ * @result true
289
+ *
290
+ * @example jQuery.validator.methods.pattern("BR1004",element,/^AR\d{4}$/)
291
+ * @result false
292
+ *
293
+ * @name jQuery.validator.methods.pattern
294
+ * @type Boolean
295
+ * @cat Plugins/Validate/Methods
296
+ */
297
+ jQuery.validator.addMethod("pattern", function(value, element, param) {
298
+ return this.optional(element) || param.test(value);
299
+ }, "Invalid format.");
300
+
@@ -0,0 +1,29 @@
1
+ /**
2
+ * jQuery Validation Plugin 1.9.0
3
+ *
4
+ * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
5
+ * http://docs.jquery.com/Plugins/Validation
6
+ *
7
+ * Copyright (c) 2006 - 2011 Jörn Zaefferer
8
+ *
9
+ * Dual licensed under the MIT and GPL licenses:
10
+ * http://www.opensource.org/licenses/mit-license.php
11
+ * http://www.gnu.org/licenses/gpl.html
12
+ */
13
+ (function(){function a(b){return b.replace(/<.[^<>]*?>/g," ").replace(/&nbsp;|&#160;/gi," ").replace(/[0-9.(),;:!?%#$'"_+=\/-]*/g,"")}jQuery.validator.addMethod("maxWords",function(b,c,d){return this.optional(c)||a(b).match(/\b\w+\b/g).length<d},jQuery.validator.format("Please enter {0} words or less."));jQuery.validator.addMethod("minWords",function(b,c,d){return this.optional(c)||a(b).match(/\b\w+\b/g).length>=d},jQuery.validator.format("Please enter at least {0} words."));jQuery.validator.addMethod("rangeWords",
14
+ function(b,c,d){return this.optional(c)||a(b).match(/\b\w+\b/g).length>=d[0]&&b.match(/bw+b/g).length<d[1]},jQuery.validator.format("Please enter between {0} and {1} words."))})();jQuery.validator.addMethod("letterswithbasicpunc",function(a,b){return this.optional(b)||/^[a-z-.,()'\"\s]+$/i.test(a)},"Letters or punctuation only please");jQuery.validator.addMethod("alphanumeric",function(a,b){return this.optional(b)||/^\w+$/i.test(a)},"Letters, numbers, spaces or underscores only please");
15
+ jQuery.validator.addMethod("lettersonly",function(a,b){return this.optional(b)||/^[a-z]+$/i.test(a)},"Letters only please");jQuery.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please");jQuery.validator.addMethod("ziprange",function(a,b){return this.optional(b)||/^90[2-5]\d\{2}-\d{4}$/.test(a)},"Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx");
16
+ jQuery.validator.addMethod("integer",function(a,b){return this.optional(b)||/^-?\d+$/.test(a)},"A positive or negative non-decimal number please");
17
+ jQuery.validator.addMethod("vinUS",function(a){if(a.length!=17)return false;var b,c,d,f,e,g=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],h=0;for(b=0;b<17;b++){f=j[b];d=a.slice(b,b+1);if(b==8)e=d;if(isNaN(d))for(c=0;c<g.length;c++){if(d.toUpperCase()===g[c]){d=i[c];d*=f;if(isNaN(e)&&c==8)e=g[c];break}}else d*=f;h+=d}a=h%11;if(a==10)a="X";if(a==e)return true;return false},
18
+ "The specified vehicle identification number (VIN) is invalid.");jQuery.validator.addMethod("dateITA",function(a,b){var c=false;if(/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(a)){var d=a.split("/");c=parseInt(d[0],10);var f=parseInt(d[1],10);d=parseInt(d[2],10);var e=new Date(d,f-1,c);c=e.getFullYear()==d&&e.getMonth()==f-1&&e.getDate()==c?true:false}else c=false;return this.optional(b)||c},"Please enter a correct date");
19
+ jQuery.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^\d\d?[\.\/-]\d\d?[\.\/-]\d\d\d?\d?$/.test(a)},"Vul hier een geldige datum in.");jQuery.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3])(:[0-5]\d){0,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59");jQuery.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))$/i.test(a)},"Please enter a valid time, between 00:00 am and 12:00 pm");
20
+ jQuery.validator.addMethod("phoneUS",function(a,b){a=a.replace(/\s+/g,"");return this.optional(b)||a.length>9&&a.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number");jQuery.validator.addMethod("phoneUK",function(a,b){return this.optional(b)||a.length>9&&a.match(/^(\(?(0|\+44)[1-9]{1}\d{1,4}?\)?\s?\d{3,4}\s?\d{3,4})$/)},"Please specify a valid phone number");
21
+ jQuery.validator.addMethod("mobileUK",function(a,b){return this.optional(b)||a.length>9&&a.match(/^((0|\+44)7(5|6|7|8|9){1}\d{2}\s?\d{6})$/)},"Please specify a valid mobile number");jQuery.validator.addMethod("strippedminlength",function(a,b,c){return jQuery(a).text().length>=c},jQuery.validator.format("Please enter at least {0} characters"));
22
+ jQuery.validator.addMethod("email2",function(a,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(a)},jQuery.validator.messages.email);
23
+ jQuery.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},
24
+ jQuery.validator.messages.url);
25
+ jQuery.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9-]+/.test(a))return false;a=a.replace(/\D/g,"");b=0;if(c.mastercard)b|=1;if(c.visa)b|=2;if(c.amex)b|=4;if(c.dinersclub)b|=8;if(c.enroute)b|=16;if(c.discover)b|=32;if(c.jcb)b|=64;if(c.unknown)b|=128;if(c.all)b=255;if(b&1&&/^(51|52|53|54|55)/.test(a))return a.length==16;if(b&2&&/^(4)/.test(a))return a.length==16;if(b&4&&/^(34|37)/.test(a))return a.length==15;if(b&8&&/^(300|301|302|303|304|305|36|38)/.test(a))return a.length==14;if(b&
26
+ 16&&/^(2014|2149)/.test(a))return a.length==15;if(b&32&&/^(6011)/.test(a))return a.length==16;if(b&64&&/^(3)/.test(a))return a.length==16;if(b&64&&/^(2131|1800)/.test(a))return a.length==15;if(b&128)return true;return false},"Please enter a valid credit card number.");
27
+ jQuery.validator.addMethod("ipv4",function(a,b){return this.optional(b)||/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i.test(a)},"Please enter a valid IP v4 address.");
28
+ jQuery.validator.addMethod("ipv6",function(a,b){return this.optional(b)||/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(a)},"Please enter a valid IP v6 address.");
29
+ jQuery.validator.addMethod("pattern",function(a,b,c){return this.optional(b)||c.test(a)},"Invalid format.");
@@ -0,0 +1,277 @@
1
+ 1.9.0
2
+ ---
3
+ * Added Basque (EU) localization
4
+ * Added Slovenian (SL) localization
5
+ * Fixed issue #127 - Finnish translations has one : instead of ;
6
+ * Fixed Russian localization, minor syntax issue
7
+ * Added in support for HTML5 input types, fixes #97
8
+ * Improved HTML5 support by setting novalidate attribute on the form, and reading the type attribute.
9
+ * Fixed showLabel() removing all classes from error element. Remove only settings.validClass. Fixes #151.
10
+ * Added 'pattern' to additional-methods to validate against arbitraty regular expressions.
11
+ * Improved email method to not allow the dot at the end (valid by RFC, but unwanted here). Fixes #143
12
+ * Fixed swedish and norwedian translations, min/max messages got switched. Fixes #181
13
+ * Fixed #184 - resetForm: should unset lastElement
14
+ * Fixed #71 - improve existing time method and add time12h method for 12h am/pm time format
15
+ * Fixed #177 - Fix validation of a single radio or checkbox input
16
+ * Fixed #189 - :hidden elements are now ignored by default
17
+ * Fixed #194 - Required as attribute fails if jQuery>=1.6 - Use .prop instead of .attr
18
+ * Fixed #47, #39, #32 - Allowed credit card numbers to contain spaces as well as dashes (spaces are commonly input by users).
19
+
20
+ 1.8.1
21
+ ---
22
+ * Added Thai (TH) localization, fixes #85
23
+ * Added Vietnamese (VI) localization, thanks Ngoc
24
+ * Fixed issue #78. Error/Valid styling applies to all radio buttons of same group for required validation.
25
+ * Don't use form.elements as that isn't supported in jQuery 1.6 anymore. Its buggy as hell anyway (IE6-8: form.elements === form).
26
+
27
+ 1.8.0
28
+ ---
29
+ * Improved NL localization (http://plugins.jquery.com/node/14120)
30
+ * Added Georgian (GE) localization, thanks Avtandil Kikabidze
31
+ * Added Serbian (SR) localization, thanks Aleksandar Milovac
32
+ * Added ipv4 and ipv6 to additional methods, thanks Natal Ngétal
33
+ * Added Japanese (JA) localization, thanks Bryan Meyerovich
34
+ * Added Catalan (CA) localization, thanks Xavier de Pedro
35
+ * Fixed missing var statements within for-in loops
36
+ * Fix for remote validation, where a formatted message got messed up (https://github.com/jzaefferer/jquery-validation/issues/11)
37
+ * Bugfixes for compability with jQuery 1.5.1, while maintaining backwards-compability
38
+
39
+ 1.7
40
+ ---
41
+ * Added Lithuanian (LT) localization
42
+ * Added Greek (EL) localization (http://plugins.jquery.com/node/12319)
43
+ * Added Latvian (LV) localization (http://plugins.jquery.com/node/12349)
44
+ * Added Hebrew (HE) localization (http://plugins.jquery.com/node/12039)
45
+ * Fixed Spanish (ES) localization (http://plugins.jquery.com/node/12696)
46
+ * Added jQuery UI themerolled demo
47
+ * Removed cmxform.js
48
+ * Fixed four missing semicolons (http://plugins.jquery.com/node/12639)
49
+ * Renamed phone-method in additional-methods.js to phoneUS
50
+ * Added phoneUK and mobileUK methods to additional-methods.js (http://plugins.jquery.com/node/12359)
51
+ * Deep extend options to avoid modifying multiple forms when using the rules-method on a single element (http://plugins.jquery.com/node/12411)
52
+ * Bugfixes for compability with jQuery 1.4.2, while maintaining backwards-compability
53
+
54
+ 1.6
55
+ ---
56
+ * Added Arabic (AR), Portuguese (PTPT), Persian (FA), Finnish (FI) and Bulgarian (BR) localization
57
+ * Updated Swedish (SE) localization (some missing html iso characters)
58
+ * Fixed $.validator.addMethod to properly handle empty string vs. undefined for the message argument
59
+ * Fixed two accidental global variables
60
+ * Enhanced min/max/rangeWords (in additional-methods.js) to strip html before counting; good when counting words in a richtext editor
61
+ * Added localized methods for DE, NL and PT, removing the dateDE and numberDE methods (use messages_de.js and methods_de.js with date and number methods instead)
62
+ * Fixed remote form submit synchronization, kudos to Matas Petrikas
63
+ * Improved interactive select validation, now validating also on click (via option or select, inconsistent across browsers); doesn't work in Safari, which doesn't trigger a click event at all on select elements; fixes http://plugins.jquery.com/node/11520
64
+ * Updated to latest form plugin (2.36), fixing http://plugins.jquery.com/node/11487
65
+ * Bind to blur event for equalTo target to revalidate when that target changes, fixes http://plugins.jquery.com/node/11450
66
+ * Simplified select validation, delegating to jQuery's val() method to get the select value; should fix http://plugins.jquery.com/node/11239
67
+ * Fixed default message for digits (http://plugins.jquery.com/node/9853)
68
+ * Fixed issue with cached remote message (http://plugins.jquery.com/node/11029 and http://plugins.jquery.com/node/9351)
69
+ * Fixed a missing semicolon in additional-methods.js (http://plugins.jquery.com/node/9233)
70
+ * Added automatic detection of substitution parameters in messages, removing the need to provide format functions (http://plugins.jquery.com/node/11195)
71
+ * Fixed an issue with :filled/:blank somewhat caused by Sizzle (http://plugins.jquery.com/node/11144)
72
+ * Added an integer method to additional-methods.js (http://plugins.jquery.com/node/9612)
73
+ * Fixed errorsFor method where the for-attribute contains characters that need escaping to be valid inside a selector (http://plugins.jquery.com/node/9611)
74
+
75
+ 1.5.5
76
+ ---
77
+ * Fix for http://plugins.jquery.com/node/8659
78
+ * Fixed trailing comma in messages_cs.js
79
+
80
+ 1.5.4
81
+ ---
82
+ * Fixed remote method bug (http://plugins.jquery.com/node/8658)
83
+
84
+ 1.5.3
85
+ ---
86
+ * Fixed a bug related to the wrapper-option, where all ancestor-elements that matched the wrapper-option where selected (http://plugins.jquery.com/node/7624)
87
+ * Updated multipart demo to use latest jQuery UI accordion
88
+ * Added dateNL and time methods to additionalMethods.js
89
+ * Added Traditional Chinese (Taiwan, tw) and Kazakhstan (KK) localization
90
+ * Moved jQuery.format (fomerly String.format) to jQuery.validator.format, jQuery.format is deprecated and will be removed in 1.6 (see http://code.google.com/p/jquery-utils/issues/detail?id=15 for details)
91
+ * Cleaned up messages_pl.js and messages_ptbr.js (still defined messages for max/min/rangeValue, which were removed in 1.4)
92
+ * Fixed flawed boolean logic in valid-plugin-method for multiple elements; now all elements need to be valid for a boolean-true result (http://plugins.jquery.com/node/8481)
93
+ * Enhancement $.validator.addMethod: An undefined third message-argument won't overwrite an existing message (http://plugins.jquery.com/node/8443)
94
+ * Enhancement to submitHandler option: When used, click events on submit buttons are captured and the submitting button is inserted into the form before calling submitHandler, and removed afterwards; keeps submit buttons intact (http://plugins.jquery.com/node/7183#comment-3585)
95
+ * Added option validClass, default "valid", which adds that class to all valid elements, after validation (http://dev.jquery.com/ticket/2205)
96
+ * Added creditcardtypes method to additionalMethods.js, including tests (via http://dev.jquery.com/ticket/3635)
97
+ * Improved remote method to allow serverside message as a string, or true for valid, or false for invalid using the clientside defined message (http://dev.jquery.com/ticket/3807)
98
+ * Improved accept method to also accept a Drupal-style comma-seperated list of values (http://plugins.jquery.com/node/8580)
99
+
100
+ 1.5.2
101
+ ---
102
+ * Fixed messages in additional-methods.js for maxWords, minWords, and rangeWords to include call to $.format
103
+ * Fixed value passed to methods to exclude carriage return (\r), same as jQuery's val() does
104
+ * Added slovak (sk) localization
105
+ * Added demo for intergration with jQuery UI tabs
106
+ * Added selects-grouping example to tabs demo (see second tab, birthdate field)
107
+
108
+ 1.5.1
109
+ ---
110
+ * Updated marketo demo to use invalidHandler option instead of binding invalid-form event
111
+ * Added TinyMCE integration example
112
+ * Added ukrainian (ua) localization
113
+ * Fixed length validation to work with trimmed value (regression from 1.5 where general trimming before validation was removed)
114
+ * Various small fixes for compability with both 1.2.6 and 1.3
115
+
116
+ 1.5
117
+ ---
118
+ * Improved basic demo, validating confirm-password field after password changed
119
+ * Fixed basic validation to pass the untrimmed input value as the first parameter to validation methods, changed required accordingly; breaks existing custom method that rely on the trimming
120
+ * Added norwegian (no), italian (it), hungarian (hu) and romanian (ro) localization
121
+ * Fixed #3195: Two flaws in swedish localization
122
+ * Fixed #3503: Extended rules("add") to accept messages propery: use to specify add custom messages to an element via rules("add", { messages: { required: "Required! " } });
123
+ * Fixed #3356: Regression from #2908 when using meta-option
124
+ * Fixed #3370: Added ignoreTitle option, set to skip reading messages from the title attribute, helps to avoid issues with Google Toolbar; default is false for compability
125
+ * Fixed #3516: Trigger invalid-form event even when remote validation is involved
126
+ * Added invalidHandler option as a shortcut to bind("invalid-form", function() {})
127
+ * Fixed Safari issue for loading indicator in ajaxSubmit-integration-demo (append to body first, then hide)
128
+ * Added test for creditcard validation and improved default message
129
+ * Enhanced remote validation, accepting options to passthrough to $.ajax as paramter (either url string or options, including url property plus everything else that $.ajax supports)
130
+
131
+ 1.4
132
+ ---
133
+ * Fixed #2931, validate elements in document order and ignore type=image inputs
134
+ * Fixed usage of $ and jQuery variables, now fully comptible with all variations of noConflict usage
135
+ * Implemented #2908, enabling custom messages via metadata ala class="{required:true,messages:{required:'required field'}}", added demo/custom-messages-metadata-demo.html
136
+ * Removed deprecated methods minValue (min), maxValue (max), rangeValue (rangevalue), minLength (minlength), maxLength (maxlength), rangeLength (rangelength)
137
+ * Fixed #2215 regression: Call unhighlight only for current elements, not everything
138
+ * Implemented #2989, enabling image button to cancel validation
139
+ * Fixed issue where IE incorrectly validates against maxlength=0
140
+ * Added czech (cs) localization
141
+ * Reset validator.submitted on validator.resetForm(), enabling a full reset when necessary
142
+ * Fixed #3035, skipping all falsy attributes when reading rules (0, undefined, empty string), removed part of the maxlength workaround (for 0)
143
+ * Added dutch (nl) localization (#3201)
144
+
145
+ 1.3
146
+ ---
147
+ * Fixed invalid-form event, now only triggered when form is invalid
148
+ * Added spanish (es), russian (ru), portuguese brazilian (ptbr), turkish (tr), and polish (pl) localization
149
+ * Added removeAttrs plugin to facilate adding and removing multiple attributes
150
+ * Added groups option to display a single message for multiple elements, via groups: { arbitraryGroupName: "fieldName1 fieldName2[, fieldNameN" }
151
+ * Enhanced rules() for adding and removing (static) rules: rules("add", "method1[, methodN]"/{method1:param[, method_n:param]}) and rules("remove"[, "method1[, method_n]")
152
+ * Enhanced rules-option, accepts space-seperated string-list of methods, eg. {birthdate: "required date"}
153
+ * Fixed checkbox group validation with inline rules: As long as the rules are specified on the first element, the group is now properly validated on click
154
+ * Fixed #2473, ignoring all rules with an explicit parameter of boolean-false, eg. required:false is the same as not specifying required at all (it was handled as required:true so far)
155
+ * Fixed #2424, with a modified patch from #2473: Methods returning a dependency-mismatch don't stop other rules from being evaluated anymore; still, success isn't applied for optional fields
156
+ * Fixed url and email validation to not use trimmed values
157
+ * Fixed creditcard validation to accept only digits and dashes ("asdf" is not a valid creditcard number)
158
+ * Allow both button and input elements for cancel buttons (via class="cancel")
159
+ * Fixed #2215: Fixed message display to call unhighlight as part of showing and hiding messages, no more visual side-effects while checking an element and extracted validator.checkForm to validate a form without UI sideeffects
160
+ * Rewrote custom selectors (:blank, :filled, :unchecked) with functions for compability with AIR
161
+
162
+ 1.2.1
163
+ -----
164
+
165
+ * Bundled delegeate plugin with validate plugin - its always required anyway
166
+ * Improved remote validation to include parts from the ajaxQueue plugin for proper synchronization (no additional plugin necessary)
167
+ * Fixed stopRequest to prevent pendingRequest < 0
168
+ * Added jQuery.validator.autoCreateRanges property, defaults to false, enable to convert min/max to range and minlength/maxlength to rangelength; this basically fixes the issue introduced by automatically creating ranges in 1.2
169
+ * Fixed optional-methods to not highlight anything at all if the field is blank, that is, don't trigger success
170
+ * Allow false/null for highlight/unhighlight options instead of forcing a do-nothing-callback even when nothing needs to be highlighted
171
+ * Fixed validate() call with no elements selected, returning undefined instead of throwing an error
172
+ * Improved demo, replacing metadata with classes/attributes for specifying rules
173
+ * Fixed error when no custom message is used for remote validation
174
+ * Modified email and url validation to require domain label and top label
175
+ * Fixed url and email validation to require TLD (actually to require domain label); 1.2 version (TLD is optional) is moved to additionals as url2 and email2
176
+ * Fixed dynamic-totals demo in IE6/7 and improved templating, using textarea to store multiline template and string interpolation
177
+ * Added login form example with "Email password" link that makes the password field optional
178
+ * Enhanced dynamic-totals demo with an example of a single message for two fields
179
+
180
+ 1.2
181
+ ---
182
+
183
+ * Added AJAX-captcha validation example (based on http://psyrens.com/captcha/)
184
+ * Added remember-the-milk-demo (thanks RTM team for the permission!)
185
+ * Added marketo-demo (thanks Glen Lipka!)
186
+ * Added support for ajax-validation, see method "remote"; serverside returns JSON, true for valid elements, false or a String for invalid, String is used as message
187
+ * Added highlight and unhighlight options, by default toggles errorClass on element, allows custom highlighting
188
+ * Added valid() plugin method for easy programmatic checking of forms and fields without the need to use the validator API
189
+ * Added rules() plguin method to read and write rules for an element (currently read only)
190
+ * Replaced regex for email method, thanks to the contribution by Scott Gonzalez, see http://projects.scottsplayground.com/email_address_validation/
191
+ * Restructured event architecture to rely solely on delegation, both improving performance, and ease-of-use for the developer (requires jquery.delegate.js)
192
+ * Moved documentation from inline to http://docs.jquery.com/Plugins/Validation - including interactive examples for all methods
193
+ * Removed validator.refresh(), validation is now completey dynamic
194
+ * Renamed minValue to min, maxValue to max and rangeValue to range, deprecating the previous names (to be removed in 1.3)
195
+ * Renamed minLength to minlength, maxLength to maxlength and rangeLength to rangelength, deprecating the previous names (to be removed in 1.3)
196
+ * Added feature to merge min + max into and range and minlength + maxlength into rangelength
197
+ * Added support for dynamic rule parameters, allowing to specify a function as a parameter eg. for minlength, called when validating the element
198
+ * Allow to specify null or an empty string as a message to display nothing (see marketo demo)
199
+ * Rules overhaul: Now supports combination of rules-option, metadata, classes (new) and attributes (new), see rules() for details
200
+
201
+ 1.1.2
202
+ ---
203
+
204
+ * Replaced regex for URL method, thanks to the contribution by Scott Gonzalez, see http://projects.scottsplayground.com/iri/
205
+ * Improved email method to better handle unicode characters
206
+ * Fixed error container to hide when all elements are valid, not only on form submit
207
+ * Fixed String.format to jQuery.format (moving into jQuery namespace)
208
+ * Fixed accept method to accept both upper and lowercase extensions
209
+ * Fixed validate() plugin method to create only one validator instance for a given form and always return that one instance (avoids binding events multiple times)
210
+ * Changed debug-mode console log from "error" to "warn" level
211
+
212
+ 1.1.1
213
+ -----
214
+
215
+ * Fixed invalid XHTML, preventing error label creation in IE since jQuery 1.1.4
216
+ * Fixed and improved String.format: Global search & replace, better handling of array arguments
217
+ * Fixed cancel-button handling to use validator-object for storing state instead of form element
218
+ * Fixed name selectors to handle "complex" names, eg. containing brackets ("list[]")
219
+ * Added button and disabled elements to exclude from validation
220
+ * Moved element event handlers to refresh to be able to add handlers to new elements
221
+ * Fixed email validation to allow long top level domains (eg. ".travel")
222
+ * Moved showErrors() from valid() to form()
223
+ * Added validator.size(): returns the number of current errors
224
+ * Call submitHandler with validator as scope for easier access of it's methods, eg. to find error labels using errorsFor(Element)
225
+ * Compatible with jQuery 1.1.x and 1.2.x
226
+
227
+ 1.1
228
+ ---
229
+
230
+ * Added validation on blur, keyup and click (for checkboxes and radiobutton). Replaces event-option.
231
+ * Fixed resetForm
232
+ * Fixed custom-methods-demo
233
+
234
+ 1.0
235
+ ---
236
+
237
+ * Improved number and numberDE methods to check for correct decimal numbers with delimiters
238
+ * Only elements that have rules are checked (otherwise success-option is applied to all elements)
239
+ * Added creditcard number method (thanks to Brian Klug)
240
+ * Added ignore-option, eg. ignore: "[@type=hidden]", using that expression to exclude elements to validate. Default: none, though submit and reset buttons are always ignored
241
+ * Heavily enhanced Functions-as-messages by providing a flexible String.format helper
242
+ * Accept Functions as messages, providing runtime-custom-messages
243
+ * Fixed exclusion of elements without rules from successList
244
+ * Fixed custom-method-demo, replaced the alert with message displaying the number of errors
245
+ * Fixed form-submit-prevention when using submitHandler
246
+ * Completely removed dependency on element IDs, though they are still used (when present) to link error labels to inputs. Achieved by using
247
+ an array with {name, message, element} instead of an object with id:message pairs for the internal errorList.
248
+ * Added support for specifying simple rules as simple strings, eg. "required" is equivalent to {required: true}
249
+ * Added feature: Add errorClass to invalid field�s parent element, making it easy to style the label/field container or the label for the field.
250
+ * Added feature: focusCleanup - If enabled, removes the errorClass from the invalid elements and hides all errors messages whenever the element is focused.
251
+ * Added success option to show the a field was validated successfully
252
+ * Fixed Opera select-issue (avoiding a attribute-collision)
253
+ * Fixed problems with focussing hidden elements in IE
254
+ * Added feature to skip validation for submit buttons with class "cancel"
255
+ * Fixed potential issues with Google Toolbar by prefering plugin option messages over title attribute
256
+ * submitHandler is only called when an actual submit event was handled, validator.form() returns false only for invalid forms
257
+ * Invalid elements are now focused only on submit or via validator.focusInvalid(), avoiding all trouble with focus-on-blur
258
+ * IE6 error container layout issue is solved
259
+ * Customize error element via errorElement option
260
+ * Added validator.refresh() to find new inputs in the form
261
+ * Added accept validation method, checks file extensions
262
+ * Improved dependecy feature by adding two custom expressions: ":blank" to select elements with an empty value and �:filled� to select elements with a value, both excluding whitespace
263
+ * Added a resetForm() method to the validator: Resets each form element (using the form plugin, if available), removes classes on invalid elements and hides all error messages
264
+ * Fixed docs for validator.showErrors()
265
+ * Fixed error label creation to always use html() instead of text(), allowing arbitrary HTML passed in as messages
266
+ * Fixed error label creation to use specified error class
267
+ * Added dependency feature: The requires method accepts both String (jQuery expressions) and Functions as the argument
268
+ * Heavily improved customizing of error message display: Use normal messages and show/hide an additional container; Completely replace message display with own mechanism (while being able to delegate to the default handler; Customize placing of generated labels (instead of default below-element)
269
+ * Fixed two major bugs in IE (error containers) and Opera (metadata)
270
+ * Modified validation methods to accept empty fields as valid (exception: of course �required� and also �equalTo� methods)
271
+ * Renamed "min" to "minLength", "max" to "maxLength", "length" to "rangeLength"
272
+ * Added "minValue", "maxValue" and "rangeValue"
273
+ * Streamlined API for support of different events. The default, submit, can be disabled. If any event is specified, that is applied to each element (instead of the entire form). Combining keyup-validation with submit-validation is now extremely easy to setup
274
+ * Added support for one-message-per-rule when defining messages via plugin settings
275
+ * Added support to wrap metadata in some parent element. Useful when metadata is used for other plugins, too.
276
+ * Refactored tests and demos: Less files, better demos
277
+ * Improved documentation: More examples for methods, more reference texts explaining some basics