From 4be5493457ad44fcaf60e383d456eb7ba9d9470f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Tue, 1 Jul 2014 22:24:12 +0200 Subject: [PATCH 01/91] Index: Update to 1.13 --- pages/index.html | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pages/index.html b/pages/index.html index 8d2010f..f2d29ff 100644 --- a/pages/index.html +++ b/pages/index.html @@ -10,16 +10,15 @@

The plugin is written and maintained by Jörn Zaefferer, a member of the jQuery team, lead developer on the jQuery UI team and maintainer of QUnit. It was started back in the early days of jQuery in 2006, and updated and improved since then.

-
Current version: 1.12.0
+
Current version: 1.13.0
License: MIT

Files:

-Download -Changelog +Download +Changelog Demos Documentation GitHub Repository -GitHub 1.12.0 Tag

Installation via Package Managers

-1.12.0 files on Microsoft's Ajax CDN (hotlinking welcome):

+1.12.0 files on Microsoft's Ajax CDN (hotlinking welcome; 1.13 not yet available):

-1.13.0 files on Microsoft's Ajax CDN (hotlinking welcome):

+1.13.1 files on Microsoft's Ajax CDN (hotlinking welcome): From cdcb13685f3a17ce04b7323552fcaaab5cac9dd4 Mon Sep 17 00:00:00 2001 From: neokabuto Date: Tue, 22 Jul 2014 16:29:44 -0400 Subject: [PATCH 07/91] Update documentation.md Fix links to demos --- pages/documentation.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pages/documentation.md b/pages/documentation.md index 1645411..bd89203 100644 --- a/pages/documentation.md +++ b/pages/documentation.md @@ -11,7 +11,7 @@ You may need different ways to specify validation rules according to the server- **"But aren't there already a ton of validation plugins out there?"** Right, there are a lot of non-jQuery-based solutions (which you'd avoid since you found jQuery) and some jQuery-based solutions. This particular one is one of the oldest jQuery plugins (started in July 2006) and has proved itself in projects all around the world. There is also an [article](http://bassistance.de/2007/07/04/about-client-side-form-validation-and-frameworks/) discussing how this plugin fits the bill of the should-be validation solution. -Not convinced? [Have a look at this example](http://jquery.bassistance.de/validate/demo/): +Not convinced? [Have a look at this example](http://jqueryvalidation.org/files/demo/):

 
@@ -170,8 +170,8 @@ So the correct code looks slightly different: # Demos -## [The Marketo sign-up form](http://jquery.bassistance.de/validate/demo/marketo/) -### [The Marketo sign-up form, step 2](http://jquery.bassistance.de/validate/demo/marketo/step2.htm) +## [The Marketo sign-up form](http://jqueryvalidation.org/files/demo/marketo/) +### [The Marketo sign-up form, step 2](http://jqueryvalidation.org/files/demo/marketo/step2.htm) Based on an old version of the marketo.com sign-up form. The custom validation was once replaced with this plugin. Thanks to Glen Lipka for contributing it! *Notable features of the demo:* @@ -182,7 +182,7 @@ Based on an old version of the marketo.com sign-up form. The custom validation w * A custom method for making the billing address on step 2 optional when "Same as Company Address" is checked * A custom method for checking the password: Checks that the password contains at least one number and one character and that it is at least 6 characters long. If the user blurs the field with an invalid value, the input is emptied and gets focus again. -## [The Remember The Milk sign-up form](http://jquery.bassistance.de/validate/demo/milk/) +## [The Remember The Milk sign-up form](http://jqueryvalidation.org/files/demo/milk/) The sign-up form from rememberthemilk.com (based on an older version). The custom validation was replaced using this plugin. Thanks to RTM for contributing! *Notable features of the demo:* @@ -190,7 +190,7 @@ The sign-up form from rememberthemilk.com (based on an older version). The custo * Custom message display, based on the original table layout, using success option to display a checkmark for valid fields * Remote validation of username, to check if it is already taken (try "Peter", "asdf" or "George") -## [A multipart "buy&sell a house" form](http://jquery.bassistance.de/validate/demo/multipart/) +## [A multipart "buy&sell a house" form](http://jqueryvalidation.org/files/demo/multipart/) Contributed by Michael Evangelista, showing a multipart form for buying and selling houses. *Notable features of the demo:* @@ -198,7 +198,7 @@ Contributed by Michael Evangelista, showing a multipart form for buying and sell * Multipart, implemented using the jQuery UI accordion and a custom method to check if an element is on the current page when validated * Integration with masked-input plugin, see Phone and Zip fields -## [Using remote validation to help with captchas](http://jquery.bassistance.de/validate/demo/captcha/) +## [Using remote validation to help with captchas](http://jqueryvalidation.org/files/demo/captcha/) Features remote validation for helping the user to fill out captchas, based on example at [psyrens.com](http://psyrens.com/captcha/). *Notable features of the demo:* From 9e40c445e48cb01c4e59ecbaccf6de7c33033f4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Tue, 2 Dec 2014 17:42:48 +0100 Subject: [PATCH 08/91] Reference: Fix demo link Fixes jzaefferer/jquery-validation#1334 --- pages/reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/reference.md b/pages/reference.md index 55b35be..a9a585a 100644 --- a/pages/reference.md +++ b/pages/reference.md @@ -92,7 +92,7 @@ To skip validation while still using a submit-button, add a class="cancel" to th
-[Demo for the cancel button](http://jquery.bassistance.de/validate/demo/errorcontainer-demo.html) +[Demo for the cancel button](http://jqueryvalidation.org/files/demo/errorcontainer-demo.html) # Validation event By default, forms are validated on submit, triggered by the user clicking the submit button or pressing enter when a form input is focused (option onsubmit). In addition, once a field was highlighted as being invalid, it is validated whenever the user types something in the field (option onkeyup). When the user enters something invalid into a valid field, it is also validated when the field loses focus (option onblur). From 93523b608f7d65a71042425aad1a9be8846c2324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Tue, 2 Dec 2014 17:47:55 +0100 Subject: [PATCH 09/91] Validate: Fix depends callback example Fixes jzaefferer/jquery-validation#1333 --- entries/validate.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entries/validate.xml b/entries/validate.xml index 0ec3090..20ccc8d 100644 --- a/entries/validate.xml +++ b/entries/validate.xml @@ -118,7 +118,7 @@ required: true, email: { depends: function(element) { - return $("#contactform_email:checked") + return $("#contactform_email").is(":checked"); } } } @@ -136,7 +136,7 @@ // min needs a parameter passed to it param: 15, depends: function(element) { - return $("#bonus-material").is(':checked'); + return $("#bonus-material").is(":checked"); } } } From 338025a140cb9420df11d4d1bb9dc9e8cd8ff24d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Tue, 9 Dec 2014 15:48:39 +0100 Subject: [PATCH 10/91] Reference: Add brief example for reusing existing methods in other methods --- pages/reference.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pages/reference.md b/pages/reference.md index a9a585a..5dba057 100644 --- a/pages/reference.md +++ b/pages/reference.md @@ -65,6 +65,12 @@ With that in place, we can add a class customer to all customer fields and be do +You can also reuse existing methods inside other custom methods, to reuse certain implementations. For example, if you're writing a custom method for validating email addresses inside a single field, you could call the existing email method for each email: + +```js +jQuery.validator.methods.email.call(this, email, element) +``` + # Error messages An error message displays a hint for the user about invalid elements, and what is wrong. There are three ways to provide error messages. Via the title attribute of the input element to validate, via error labels and via plugin settings (option messages). From 1610c42500ae6caea019c72874b165b4ac8ceef9 Mon Sep 17 00:00:00 2001 From: Dmitriy Akulov Date: Thu, 10 Jul 2014 20:43:09 +0300 Subject: [PATCH 11/91] Index: Add jsDelivr links Closes #8 --- pages/index.html | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pages/index.html b/pages/index.html index c8d03f8..0b1d1d2 100644 --- a/pages/index.html +++ b/pages/index.html @@ -4,7 +4,7 @@

This jQuery plugin makes simple clientside form validation easy, whilst still offering plenty of customization options. It makes a good choice if you’re building something new from scratch, but also when you’re trying to integrate something into an existing application with lots of existing markup. The plugin comes bundled with a useful set of validation methods, including URL and email validation, while providing an API to write your own methods. All bundled methods come with default error messages in english and translations into 37 other languages.

-

If you want to support the development of this plugin, please donate to the ongoing pledgie.org campagin.

+

If you want to support the development of this plugin, please donate to the ongoing pledgie.org campagin.

Click here to lend your support to: jQuery Validation Plugin and make a donation @@ -37,6 +37,16 @@

  • vsdoc file for VisualStudio
  • +

    +Latest files on jsDelivr CDN (hotlinking welcome):

    + + +

    Dependencies

    Required

      @@ -50,4 +60,4 @@

      Support

    Donate

    -Click here to lend your support to: jQuery Validation Plugin and make a donation at www.pledgie.com ! \ No newline at end of file +Click here to lend your support to: jQuery Validation Plugin and make a donation at www.pledgie.com ! From 5243c70910039a71b4bc8e9e8efc931578d29028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Fri, 19 Dec 2014 12:55:48 +0100 Subject: [PATCH 12/91] Documentation: Drop reference to dead site --- pages/documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/documentation.md b/pages/documentation.md index bd89203..b6c1b5e 100644 --- a/pages/documentation.md +++ b/pages/documentation.md @@ -199,7 +199,7 @@ Contributed by Michael Evangelista, showing a multipart form for buying and sell * Integration with masked-input plugin, see Phone and Zip fields ## [Using remote validation to help with captchas](http://jqueryvalidation.org/files/demo/captcha/) -Features remote validation for helping the user to fill out captchas, based on example at [psyrens.com](http://psyrens.com/captcha/). +Features remote validation for helping the user to fill out captchas. *Notable features of the demo:* From 4d6b7f97f4445783928a152a513233f18062e1ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Fri, 19 Dec 2014 12:56:03 +0100 Subject: [PATCH 13/91] Index: Add Webucator video, ask for donations more directly --- pages/index.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pages/index.html b/pages/index.html index 0b1d1d2..a7b1c6e 100644 --- a/pages/index.html +++ b/pages/index.html @@ -4,7 +4,10 @@

    This jQuery plugin makes simple clientside form validation easy, whilst still offering plenty of customization options. It makes a good choice if you’re building something new from scratch, but also when you’re trying to integrate something into an existing application with lots of existing markup. The plugin comes bundled with a useful set of validation methods, including URL and email validation, while providing an API to write your own methods. All bundled methods come with default error messages in english and translations into 37 other languages.

    -

    If you want to support the development of this plugin, please donate to the ongoing pledgie.org campagin.

    +

    For a quick overview of what this plugin provides, check out this Webucator video (they also provide jQuery trainings:

    + + +

    If you use this plugin, you should support the ongoing development by donating to the pledgie.org campagin.

    Click here to lend your support to: jQuery Validation Plugin and make a donation From dc79b26c5a8d4422cf0a3afc129286e171494b6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Fri, 19 Dec 2014 12:59:14 +0100 Subject: [PATCH 14/91] Index: Fix missing paren --- pages/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.html b/pages/index.html index a7b1c6e..d48df8a 100644 --- a/pages/index.html +++ b/pages/index.html @@ -4,7 +4,7 @@

    This jQuery plugin makes simple clientside form validation easy, whilst still offering plenty of customization options. It makes a good choice if you’re building something new from scratch, but also when you’re trying to integrate something into an existing application with lots of existing markup. The plugin comes bundled with a useful set of validation methods, including URL and email validation, while providing an API to write your own methods. All bundled methods come with default error messages in english and translations into 37 other languages.

    -

    For a quick overview of what this plugin provides, check out this Webucator video (they also provide jQuery trainings:

    +

    For a quick overview of what this plugin provides, check out this Webucator video (they also provide jQuery trainings):

    If you use this plugin, you should support the ongoing development by donating to the pledgie.org campagin.

    From b197306ef62ae7db5e51201207aa5bede9301e7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Sat, 20 Dec 2014 12:38:37 -0500 Subject: [PATCH 15/91] Build: Upgrade to Grunt 0.4 API * Upgrades to grunt 0.4.5 * Upgrades to grunt-jquery-content 2.0.0 * Removes many grunt plugins which are now bundled into grunt-jquery-content * Removes many unused and unnecessary tasks * Removes directory from sample config since there's only one useful value Requires updating WordPress plugin from grunt-wordpress 1.0.7 to gilded-wordpress 1.0.0. --- Gruntfile.js | 40 ++++++++++++++++++++++++++++++++++++++ config-sample.json | 3 +-- grunt.js | 48 ---------------------------------------------- package.json | 7 ++----- 4 files changed, 43 insertions(+), 55 deletions(-) create mode 100644 Gruntfile.js delete mode 100644 grunt.js diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..dfc6e63 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,40 @@ +module.exports = function( grunt ) { + +grunt.loadNpmTasks( "grunt-jquery-content" ); + +grunt.initConfig({ + xmllint: { + all: [ + "entries/**", + "categories.xml", + "entries2html.xsl", + "notes.xsl" + ] + }, + "build-posts": { + page: "pages/**" + }, + "build-xml-entries": { + all: "entries/**" + }, + "build-resources": { + all: "resources/**" + }, + wordpress: (function() { + var config = require( "./config" ); + config.dir = "dist/wordpress"; + return config; + })() +}); + +grunt.registerTask( "lint", [ "xmllint" ] ); + +grunt.registerTask( "build", [ + "build-posts", + "build-resources", + "build-xml-entries", + "build-xml-categories", + "build-xml-full" +]); + +}; diff --git a/config-sample.json b/config-sample.json index 293c29a..ba43644 100644 --- a/config-sample.json +++ b/config-sample.json @@ -1,6 +1,5 @@ { "url": "validation.local", "username": "admin", - "password": "secret", - "dir": "dist/wordpress" + "password": "secret" } diff --git a/grunt.js b/grunt.js deleted file mode 100644 index 94ef222..0000000 --- a/grunt.js +++ /dev/null @@ -1,48 +0,0 @@ -/*jshint node:true */ -module.exports = function( grunt ) { -"use strict"; - -var entryFiles = grunt.file.expandFiles( "entries/*.xml" ); - -grunt.loadNpmTasks( "grunt-clean" ); -grunt.loadNpmTasks( "grunt-wordpress" ); -grunt.loadNpmTasks( "grunt-jquery-content" ); -grunt.loadNpmTasks( "grunt-check-modules" ); - -grunt.initConfig({ - clean: { - folder: "dist" - }, - lint: { - grunt: "grunt.js" - }, - watch: { - files: [ "entries/**", "pages/**", "categories.xml" ], - tasks: "build-xml-entries" - }, - xmllint: { - all: [].concat( entryFiles, "categories.xml", "entries2html.xsl" ) - }, - xmltidy: { - all: [].concat( entryFiles, "categories.xml" ) - }, - "build-pages": { - all: grunt.file.expandFiles( "pages/**" ) - }, - "build-xml-entries": { - all: entryFiles - }, - "build-resources": { - all: grunt.file.expandFiles( "resources/**" ) - }, - wordpress: grunt.utils._.extend({ - dir: "dist/wordpress" - }, grunt.file.readJSON( "config.json" ) ) -}); - -grunt.registerTask( "default", "build-wordpress" ); -grunt.registerTask( "build", "build-pages build-xml-entries build-xml-categories build-xml-full build-resources" ); -grunt.registerTask( "build-wordpress", "check-modules clean lint xmllint build" ); -grunt.registerTask( "tidy", "xmllint xmltidy" ); - -}; diff --git a/package.json b/package.json index 580f466..7104a1f 100644 --- a/package.json +++ b/package.json @@ -21,10 +21,7 @@ } ], "dependencies": { - "grunt": "0.3.17", - "grunt-clean": "0.3.0", - "grunt-wordpress": "1.0.7", - "grunt-jquery-content": "0.9.0", - "grunt-check-modules": "0.1.0" + "grunt": "0.4.5", + "grunt-jquery-content": "2.0.0" } } From ec201286231210bdb08d0025f9285cc8cffc010c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Wed, 24 Dec 2014 16:53:28 +0100 Subject: [PATCH 16/91] README: Update URLs for required WordPress plugins Ref b197306ef62ae7db5e51201207aa5bede9301e7f --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 302e805..7c3ecff 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,8 @@ The `xmllint` and `xsltproc` utilities need to be in your path. If you are on Wi * Install [WordPress](http://wordpress.org/download/) * Install [jqueryvalidation-theme](https://github.com/jzaefferer/validation-theme) - clone that repo, then symlink it into your `wp-content/themes` folder -* Install [grunt-wordpress plugin](https://github.com/jquery/jquery-wp-content/blob/master/mu-plugins/grunt-wordpress.php) -* Install [jquery-static-index plugin](https://github.com/jquery/jquery-wp-content/blob/master/plugins/jquery-static-index.php) +* Install [gilded-wordpress plugin](https://raw.githubusercontent.com/scottgonzalez/gilded-wordpress/v1.0.0/gilded-wordpress.php) +* Install [jquery-static-index plugin](https://raw.githubusercontent.com/jquery/jquery-wp-content/v4.0.1/plugins/jquery-static-index.php) ### Installation @@ -25,4 +25,4 @@ In this repo: ### Deploy -`grunt deploy` \ No newline at end of file +`grunt deploy` From c5777fc631ba1c93342bee0013d32457537c3afc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Wed, 14 Jan 2015 16:30:38 +0100 Subject: [PATCH 17/91] addMethod: Add custom email method example --- entries/jQuery.validator.addMethod.xml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/entries/jQuery.validator.addMethod.xml b/entries/jQuery.validator.addMethod.xml index e19d651..59d3fa5 100644 --- a/entries/jQuery.validator.addMethod.xml +++ b/entries/jQuery.validator.addMethod.xml @@ -40,8 +40,17 @@ jQuery.validator.addMethod("domain", function(value, element) { Adds a validation method that checks if a given value equals the addition of the two parameters. + + + Adds a custom email validation method that is less strict than the one built-in. + From ed483fc10af64c3b6ae2377587b80b6552c4828c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Tue, 17 Feb 2015 11:01:47 +0100 Subject: [PATCH 18/91] Reference: Update title --- pages/reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/reference.md b/pages/reference.md index 5dba057..84c43f3 100644 --- a/pages/reference.md +++ b/pages/reference.md @@ -1,5 +1,5 @@ # Goals From 0feaf618e32bcf6432aea60993740cff70e14329 Mon Sep 17 00:00:00 2001 From: Figaw Date: Sun, 15 Feb 2015 21:22:43 +0100 Subject: [PATCH 19/91] Entries: Fixed typo in example, id should match label's for attribute Closes #11 --- entries/require_from_group-method.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entries/require_from_group-method.xml b/entries/require_from_group-method.xml index 0f1685e..82e3d4c 100644 --- a/entries/require_from_group-method.xml +++ b/entries/require_from_group-method.xml @@ -34,7 +34,7 @@ $( "#myform" ).validate({
    - +
    ]]> From 61cdef2bb4ffaad19f5fca6fabff741ae5efe577 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Tue, 17 Feb 2015 11:39:21 +0100 Subject: [PATCH 20/91] Reference: Markup cleanup, fix skipping-validation --- pages/reference.md | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/pages/reference.md b/pages/reference.md index 84c43f3..3cde9e7 100644 --- a/pages/reference.md +++ b/pages/reference.md @@ -11,10 +11,10 @@ The plugin can never replace serverside validation and doesn't intend to do so. # Markup recommendations Each input has a label associated with it: The for-attribute of the label refers to the id-attribute of the input. -
    
    +```html
     
     
    -
    +``` The name attribute is '''required''' for input elements, the validation plugin doesn't work without it. Usually name and id attributes should have the same value. @@ -27,7 +27,7 @@ A validation rule applies one or more validation methods to an input element. Yo ## Fields with complex names (brackets, dots) If your form consists of fields using names that aren't legal JavaScript identifiers, you have to quote those names when using the rules option: -
    
    +```js
      $("#myform").validate({
        rules: {
          // no quoting necessary
    @@ -38,14 +38,14 @@ If your form consists of fields using names that aren't legal JavaScript identif
          "user.address.street": "required"
        }
      });
    -
    +``` ## Refactoring rules Whenever you have multiple fields with the same rules and messages, refactoring those can reduce a lot of duplication. Using addMethod and addClassRules are most effective for that. Let's consider an example where you have ten customer fields, each required and with a minlength of 2. You need custom messages for both rules. To avoid having to specify those rules and messages again and again, we can alias existing methods with different messages and group them into a single class: -
    
    +```js
      // alias required to cRequired with new message
      $.validator.addMethod("cRequired", $.validator.methods.required,
        "Customer name required");
    @@ -55,15 +55,15 @@ Let's consider an example where you have ten customer fields, each required and
        $.format("Customer name must have at least {0} characters"));
      // combine them both, including the parameter for minlength
      $.validator.addClassRules("customer", { cRequired: true, cMinlength: 2 });
    -
    +``` With that in place, we can add a class customer to all customer fields and be done with it: -
    
    +```html
      
      
      
    -
    +``` You can also reuse existing methods inside other custom methods, to reuse certain implementations. For example, if you're writing a custom method for validating email addresses inside a single field, you could call the existing email method for each email: @@ -91,12 +91,14 @@ By default, the first invalid element in a form is focused after submitting a fo By default, the form submission is prevented when the form is invalid, and submitted as normal when it is valid. You can also handle the submission manually (option submitHandler). ## Skipping validation on submit -To skip validation while still using a submit-button, add a class="cancel" to that input. +To skip validation while still using a submit-button, add the attribte "formnovalidate" to that input: + +```html + + +``` -
    
    - 
    - 
    -
    +This used to work by adding `class="cancel"` to the input, this is now deprecated. [Demo for the cancel button](http://jqueryvalidation.org/files/demo/errorcontainer-demo.html) @@ -111,4 +113,4 @@ While developing and debugging the form, you should set the debug option to true Some issues are caused by certain form element's names. A name you should avoid is "submit" (for submit buttons and anything else). Browsers expose form elements as properties of the form element, by their name, in this case hiding native methods like submit(). Just don't use name="submit" and you're good. # Validating multiple forms on one page -The plugin can handle only one form per call. In case you have multiple forms on a single page which you want to validate, you can avoid having to duplicate the plugin settings by modifying the defaults. Use jQuery.validator.setDefaults to override multiple settings at once. \ No newline at end of file +The plugin can handle only one form per call. In case you have multiple forms on a single page which you want to validate, you can avoid having to duplicate the plugin settings by modifying the defaults. Use jQuery.validator.setDefaults to override multiple settings at once. From f14c554e6bc1e73cab08e5df4451655c16e5a426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Tue, 30 Jun 2015 15:45:24 +0200 Subject: [PATCH 21/91] Fix bad links to old site Fixes jzaefferer/jquery-validation#1479 --- entries/remote-method.xml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/entries/remote-method.xml b/entries/remote-method.xml index 242fd4f..1891e9c 100644 --- a/entries/remote-method.xml +++ b/entries/remote-method.xml @@ -5,7 +5,7 @@ The serverside resource is called via jQuery.ajax (XMLHttpRequest) and gets a key/value pair corresponding to the name of the validated element and its value as a GET parameter. The response is evaluated as JSON and must be true for valid elements, and can be any false, undefined or null for invalid elements, using the default message; or a string, eg. "That name is already taken, try peter123 instead" to display as the error message. -

    For more examples, take a look the marketo demo and the milk demo.

    +

    For more examples, take a look the marketo demo and the milk demo.

    diff --git a/package.json b/package.json index 7104a1f..bad9a06 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "title": "jQuery Validation Plugin site content", "description": "Site content for the jQuery Validation Plugin", "version": "1.0.0", - "homepage": "http://validation.bassistance.de", + "homepage": "http://http://jqueryvalidation.org/", "author": { "name": "Jörn Zaefferer (http://bassistance.de/)" }, From 1ee3102950b0b2711f3e742acfd19d17344f6921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Tue, 30 Jun 2015 17:04:55 +0200 Subject: [PATCH 22/91] Replace $.format with $.validator.format Fixes jzaefferer/jquery-validation#985 --- entries/jQuery.validator.format.xml | 25 ------------------------- entries/rules.xml | 2 +- entries/validate.xml | 4 ++-- pages/reference.md | 2 +- 4 files changed, 4 insertions(+), 29 deletions(-) diff --git a/entries/jQuery.validator.format.xml b/entries/jQuery.validator.format.xml index bcf61fd..49c63c5 100644 --- a/entries/jQuery.validator.format.xml +++ b/entries/jQuery.validator.format.xml @@ -26,30 +26,5 @@ var template = jQuery.validator.format("{0} is not a valid value"); alert(template("abc")); ]]> - diff --git a/entries/rules.xml b/entries/rules.xml index 585fb8d..88920e1 100644 --- a/entries/rules.xml +++ b/entries/rules.xml @@ -51,7 +51,7 @@ $( "#myinput" ).rules( "add", { minlength: 2, messages: { required: "Required input", - minlength: jQuery.format("Please, at least {0} characters are necessary") + minlength: jQuery.validator.format("Please, at least {0} characters are necessary") } }); ]]> diff --git a/entries/validate.xml b/entries/validate.xml index 20ccc8d..f8dbaf3 100644 --- a/entries/validate.xml +++ b/entries/validate.xml @@ -168,7 +168,7 @@ } }); -

    Example: Validates the name-field as required and having at least two characters. Provides a callback message using jQuery.format to avoid having to specify the parameter in two places.

    +

    Example: Validates the name-field as required and having at least two characters. Provides a callback message using jQuery.validator.format to avoid having to specify the parameter in two places.

    
     					$(".selector").validate({
     						rules: {
    @@ -180,7 +180,7 @@
     						messages: {
     							name: {
     								required: "We need your email address to contact you",
    -								minlength: jQuery.format("At least {0} characters required!")
    +								minlength: jQuery.validator.format("At least {0} characters required!")
     							}
     						}
     					});
    diff --git a/pages/reference.md b/pages/reference.md
    index 3cde9e7..209dc37 100644
    --- a/pages/reference.md
    +++ b/pages/reference.md
    @@ -52,7 +52,7 @@ Let's consider an example where you have ten customer fields, each required and
      // alias minlength, too
      $.validator.addMethod("cMinlength", $.validator.methods.minlength,
        // leverage parameter replacement for minlength, {0} gets replaced with 2
    -   $.format("Customer name must have at least {0} characters"));
    +   $.validator.format("Customer name must have at least {0} characters"));
      // combine them both, including the parameter for minlength
      $.validator.addClassRules("customer", { cRequired: true, cMinlength: 2 });
     ```
    
    From 8a9fb8a392325f42b4b480fcdeed7ce576cfb9ea Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= 
    Date: Tue, 7 Jul 2015 18:19:44 +0200
    Subject: [PATCH 23/91] Index: Update to 1.14.0
    
    ---
     pages/index.html | 28 ++++++++++++++--------------
     1 file changed, 14 insertions(+), 14 deletions(-)
    
    diff --git a/pages/index.html b/pages/index.html
    index d48df8a..febd768 100644
    --- a/pages/index.html
    +++ b/pages/index.html
    @@ -13,12 +13,12 @@
     
     

    The plugin is written and maintained by Jörn Zaefferer, a member of the jQuery team, lead developer on the jQuery UI team and maintainer of QUnit. It was started back in the early days of jQuery in 2006, and updated and improved since then.

    -
    Current version: 1.13.1
    +
    Current version: 1.14.0
    License: MIT

    Files:

    -Download -Changelog +Download +Changelog Demos Documentation GitHub Repository @@ -30,30 +30,30 @@

    Installation via Package Managers

    -1.13.1 files on Microsoft's Ajax CDN (hotlinking welcome):

    +1.14.0 files on Microsoft's Ajax CDN (hotlinking welcome):

    Latest files on jsDelivr CDN (hotlinking welcome):

    Dependencies

    Required

    Support

    From cce073c7ef2f948b622c0c96f3ad7309a762d5fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Wed, 8 Jul 2015 11:52:07 +0200 Subject: [PATCH 24/91] All: Improve documentation! Fixes jzaefferer/jquery-validation#832 Fixes jzaefferer/jquery-validation#875 Fixes jzaefferer/jquery-validation#976 Fixes jzaefferer/jquery-validation#1511 --- entries/rules.xml | 4 ++-- pages/documentation.md | 2 ++ pages/reference.md | 32 ++++++++++++++++++++++---------- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/entries/rules.xml b/entries/rules.xml index 88920e1..59c6e9a 100644 --- a/entries/rules.xml +++ b/entries/rules.xml @@ -11,10 +11,10 @@

    There are several ways to specify validation rules.

      -
    • Validation methods without parameters can be specified as classes on the element (recommended)
    • Validation methods with parameters can be specified as attributes (recommended)
    • -
    • Both can be specified as metadata using the metadata plugin
    • +
    • Validation methods without parameters can be specified as classes on the element
    • Both can be specified using the rules-option of the validate()-method
    • +
    • Both rules and messages can be specified using data attributes, using data-msg (a generic, not-method specifi message), data-msg-[method] and data-rule-[method].

    When setting, the rules can also contain a messages-object, specifying custom messages for existing or added rules.

    diff --git a/pages/documentation.md b/pages/documentation.md index b6c1b5e..36b4254 100644 --- a/pages/documentation.md +++ b/pages/documentation.md @@ -131,6 +131,8 @@ Some more methods are provided as add-ons, and are currently included in additio * [`phoneUS` - Validate for valid US phone number.](/phoneUS-method) * [`require_from_group` - Ensures a given number of fields in a group are complete.](/require_from_group-method) +You can find the [source code for all additional methods in the GitHub repository](https://github.com/jzaefferer/jquery-validation/tree/master/src/additional). + # [General Guidelines](/reference) The General Guidelines section provides detailed discussion of the design and ideas behind the plugin, explaining why certain things are as they are. It covers the features in more detail than the API documentation, which just briefly explains the various methods and options available. diff --git a/pages/reference.md b/pages/reference.md index 209dc37..c124888 100644 --- a/pages/reference.md +++ b/pages/reference.md @@ -22,10 +22,10 @@ The name attribute is '''required''' for input elements, the validation plugin d A validation method implements the logic to validate any element. Provided are a set of default validation methods, such as required. Apart from required itself and equalTo, all validation methods declare an element valid when it has no value at all. That way an email field is optional unless required is specified. You can specify an element input to contain a valid email address, or nothing at all. Use jQuery.validator.addMethod to implement custom methods. # Rules -A validation rule applies one or more validation methods to an input element. You can specify validation rules via metadata or via plugin settings (option rules). The decision is often influenced by serverside infrastructure. If a web framework is used, it is often easier to use metadata, which is also good for fast prototyping. Plugin settings produce cleaner markup, though valid markup results from both. +A validation rule applies one or more validation methods to an input element. You can specify validation rules via metadata or via plugin settings (option `rules`). The decision is often influenced by serverside infrastructure. If a web framework is used, it is often easier to use metadata, which is also good for fast prototyping. Plugin settings produce cleaner markup, though valid markup results from both. ## Fields with complex names (brackets, dots) -If your form consists of fields using names that aren't legal JavaScript identifiers, you have to quote those names when using the rules option: +If your form consists of fields using names that aren't legal JavaScript identifiers, you have to quote those names when using the `rules` option: ```js $("#myform").validate({ @@ -72,23 +72,29 @@ jQuery.validator.methods.email.call(this, email, element) ``` # Error messages -An error message displays a hint for the user about invalid elements, and what is wrong. There are three ways to provide error messages. Via the title attribute of the input element to validate, via error labels and via plugin settings (option messages). +An error message displays a hint for the user about invalid elements, and what is wrong. There are four ways to provide error messages. Via the title attribute of the input element to validate, via data attributes, via error labels and via plugin settings (option `messages`). All validation rules included here provide a default error message which you can use for prototyping, because it is used when no specific message is provided. The priorities are as follows: A custom message (passed by plugin options), the element's title, the default message. +When using data attributes, you can set a generic message for all rules, or specific messages per rule: +```html + + +``` + # Error message display -Error messages are handled via label elements with an additional class (option errorClass). The link between the message and the invalid element is provided via the labels for attribute. When provided in the markup, they are shown and hidden accordingly, and otherwise created on demand. By default, labels are created after the invalid element, this is also customizable (option errorPlacement). It is also possible to put them into an error container (option errorLabelContainer). To use a different element then a label, specify the errorElement option. +Error messages are handled via label elements with an additional class (option `errorClass`). The link between the message and the invalid element is provided via the labels for attribute. When provided in the markup, they are shown and hidden accordingly, and otherwise created on demand. By default, labels are created after the invalid element, this is also customizable (option `errorPlacement`). It is also possible to put them into an error container (option `errorLabelContainer`). To use a different element then a label, specify the `errorElement` option. # General messages -In addition to field-specific messages you can display a general "your form is invalid, please fix the highlighted fields!" message in a container anywhere on your page, eg. above the form (option errorContainer). The container is shown and hidden when errors occur and are fixed accordingly. The container for error labels (option errorLabelContainer) can also be nested inside the error container. +In addition to field-specific messages you can display a general "your form is invalid, please fix the highlighted fields!" message in a container anywhere on your page, eg. above the form (option `errorContainer`). The container is shown and hidden when errors occur and are fixed accordingly. The container for error labels (option `errorLabelContainer`) can also be nested inside the error container. # Focusing of invalid elements -By default, the first invalid element in a form is focused after submitting a form with invalid elements. To prevent confusion on the behalf of the user, the plugin remembers the element that had focus when the form was submitted, and refocuses that element. That way the user can try to fill out elements of the form at the end, without being forced to focus them again and again. This can be disabled (option focusInvalid). +By default, the first invalid element in a form is focused after submitting a form with invalid elements. To prevent confusion on the behalf of the user, the plugin remembers the element that had focus when the form was submitted, and refocuses that element. That way the user can try to fill out elements of the form at the end, without being forced to focus them again and again. This can be disabled (option `focusInvalid`). # Form submit -By default, the form submission is prevented when the form is invalid, and submitted as normal when it is valid. You can also handle the submission manually (option submitHandler). +By default, the form submission is prevented when the form is invalid, and submitted as normal when it is valid. You can also handle the submission manually (option `submitHandler`). ## Skipping validation on submit To skip validation while still using a submit-button, add the attribte "formnovalidate" to that input: @@ -103,14 +109,20 @@ This used to work by adding `class="cancel"` to the input, this is now deprecate [Demo for the cancel button](http://jqueryvalidation.org/files/demo/errorcontainer-demo.html) # Validation event -By default, forms are validated on submit, triggered by the user clicking the submit button or pressing enter when a form input is focused (option onsubmit). In addition, once a field was highlighted as being invalid, it is validated whenever the user types something in the field (option onkeyup). When the user enters something invalid into a valid field, it is also validated when the field loses focus (option onblur). +By default, forms are validated on submit, triggered by the user clicking the submit button or pressing enter when a form input is focused (option `onsubmit`). In addition, once a field was highlighted as being invalid, it is validated whenever the user types something in the field (option `onkeyup`). When the user enters something invalid into a valid field, it is also validated when the field loses focus (option `onblur`). The goal of these interactions is to provide feedback as early as possible, whilst avoiding user annoyance. Displaying error messages before the user had the chance to even type something is not helpful. # Developing and debugging a form -While developing and debugging the form, you should set the debug option to true. That prevents form submission on both valid and invalid forms and outputs some helpful messages to window.console (available via Firebug or Firebug Lite) that help debugging. When you have everything set up and don't get any error messages displayed, check if your rules all accept empty elements as valid (like email or url methods). +While developing and debugging the form, you should set the `debug` option to true. That prevents form submission on both valid and invalid forms and outputs some helpful messages to window.console (available via Firebug or Firebug Lite) that help debugging. When you have everything set up and don't get any error messages displayed, check if your rules all accept empty elements as valid (like email or url methods). Some issues are caused by certain form element's names. A name you should avoid is "submit" (for submit buttons and anything else). Browsers expose form elements as properties of the form element, by their name, in this case hiding native methods like submit(). Just don't use name="submit" and you're good. # Validating multiple forms on one page -The plugin can handle only one form per call. In case you have multiple forms on a single page which you want to validate, you can avoid having to duplicate the plugin settings by modifying the defaults. Use jQuery.validator.setDefaults to override multiple settings at once. +The plugin can handle only one form per call. In case you have multiple forms on a single page which you want to validate, you have to initialise them all individually: +```js +$( "form" ).each( function() { + $( this ).validate( options ); +} ); +``` +You can avoid having to duplicate the plugin settings by modifying the defaults, using jQuery.validator.setDefaults to override multiple settings at once. From 885b7b200e334605c3ff56da0d721f3702941279 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Wed, 8 Jul 2015 12:11:35 +0200 Subject: [PATCH 25/91] fixed typo followup to cce073c7ef2f948b622c0c96f3ad7309a762d5fc --- entries/rules.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entries/rules.xml b/entries/rules.xml index 59c6e9a..5c510bc 100644 --- a/entries/rules.xml +++ b/entries/rules.xml @@ -14,7 +14,7 @@
  • Validation methods with parameters can be specified as attributes (recommended)
  • Validation methods without parameters can be specified as classes on the element
  • Both can be specified using the rules-option of the validate()-method
  • -
  • Both rules and messages can be specified using data attributes, using data-msg (a generic, not-method specifi message), data-msg-[method] and data-rule-[method].
  • +
  • Both rules and messages can be specified using data attributes, using data-msg (a generic, not-method specific message), data-msg-[method] and data-rule-[method].
  • When setting, the rules can also contain a messages-object, specifying custom messages for existing or added rules.

    From add4f75eff800da99351010328a60271953110b2 Mon Sep 17 00:00:00 2001 From: sparky672 Date: Tue, 21 Apr 2015 11:03:36 -0500 Subject: [PATCH 26/91] Remote Method: Properly document the require server response There is a lot of confusion surrounding proper usage of the `remote` method based on the number of Stack Overflow questions about it. I am proposing this slight change to help clarify. Closes #12 --- entries/remote-method.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entries/remote-method.xml b/entries/remote-method.xml index 1891e9c..544af16 100644 --- a/entries/remote-method.xml +++ b/entries/remote-method.xml @@ -3,7 +3,7 @@ remote method Requests a resource to check the element for validity. - The serverside resource is called via jQuery.ajax (XMLHttpRequest) and gets a key/value pair corresponding to the name of the validated element and its value as a GET parameter. The response is evaluated as JSON and must be true for valid elements, and can be any false, undefined or null for invalid elements, using the default message; or a string, eg. "That name is already taken, try peter123 instead" to display as the error message. + The serverside resource is called via jQuery.ajax (XMLHttpRequest) and gets a key/value pair corresponding to the name of the validated element and its value as a GET parameter. The serverside response must be a JSON string that must be "true" for valid elements, and can be "false", undefined, or null for invalid elements, using the default error message. If the serverside response is a string, eg. "That name is already taken, try peter123 instead", this string will be displayed as a custom error message in place of the default.

    For more examples, take a look the marketo demo and the milk demo.

    From 8efd52ba5e932f1a010b52338d016063c8287426 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 21 Jul 2015 10:42:30 +0200 Subject: [PATCH 27/91] Entries: Promote jQuery.validator.methods property as public api Includes a example which shows how to make built-in email validation use a custom email regular expression pattern. --- entries/email-method.xml | 1 + entries/jQuery.validator.methods.xml | 15 +++++++++++++++ pages/documentation.md | 2 ++ 3 files changed, 18 insertions(+) create mode 100644 entries/jQuery.validator.methods.xml diff --git a/entries/email-method.xml b/entries/email-method.xml index 613ad85..a0aedbe 100644 --- a/entries/email-method.xml +++ b/entries/email-method.xml @@ -5,6 +5,7 @@ Return true if the value is a valid email address.

    Works with text inputs.

    +

    In case you need a custom email pattern use the $.validator.methods property.

    Makes "field" required and an email address. diff --git a/entries/jQuery.validator.methods.xml b/entries/jQuery.validator.methods.xml new file mode 100644 index 0000000..eba2d32 --- /dev/null +++ b/entries/jQuery.validator.methods.xml @@ -0,0 +1,15 @@ + + + + jQuery.validator.methods + Object holding all validation methods known to the validator. This can be accessed to override individual methods, while keeping the default messages. + + Sets a custom email pattern for the built-in email validation rule. + + + + diff --git a/pages/documentation.md b/pages/documentation.md index 36b4254..d671a1b 100644 --- a/pages/documentation.md +++ b/pages/documentation.md @@ -133,6 +133,8 @@ Some more methods are provided as add-ons, and are currently included in additio You can find the [source code for all additional methods in the GitHub repository](https://github.com/jzaefferer/jquery-validation/tree/master/src/additional). +It is possible to re-define the implementation of the built-in rules using the [`$.validator.methods` property](/jQuery.validator.methods/) + # [General Guidelines](/reference) The General Guidelines section provides detailed discussion of the design and ideas behind the plugin, explaining why certain things are as they are. It covers the features in more detail than the API documentation, which just briefly explains the various methods and options available. From 0e1e573dd3147e86bca805e0dde00cff9963bdde Mon Sep 17 00:00:00 2001 From: Brahim Arkni Date: Sun, 25 Oct 2015 19:12:09 +0000 Subject: [PATCH 28/91] Entries: Added `normalizer` documentation Ref: jzaefferer/jquery-validation#1609 --- entries/normalizer.xml | 75 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 entries/normalizer.xml diff --git a/entries/normalizer.xml b/entries/normalizer.xml new file mode 100644 index 0000000..e1b7d0f --- /dev/null +++ b/entries/normalizer.xml @@ -0,0 +1,75 @@ + + + normalizer + + + The value of the element. + + + Prepares/transforms the elements value for validation. + + Note that this method: +

    Doesn't change the elements' value, it only changes the value used for validation.

    +

    Gets the value passed as argument, and "this" within it references the corresponding DOMElement.

    +

    Needs to return a String value, otherwise it will throw a TypeError exception.

    +
    + + Makes "field" required and use a normalizer to trim its value before validating + + + + + Makes "url" required and use a normalizer to append 'http://', if not present, to the value of the "url" element before validating + + + + +
    From 6bda8e12a19d40c93441fcdc677971c855d00238 Mon Sep 17 00:00:00 2001 From: Brahim Arkni Date: Sun, 25 Oct 2015 22:25:38 +0000 Subject: [PATCH 29/91] Entries: Fixed the second example in normalizer's entry --- entries/normalizer.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entries/normalizer.xml b/entries/normalizer.xml index e1b7d0f..6310687 100644 --- a/entries/normalizer.xml +++ b/entries/normalizer.xml @@ -46,8 +46,8 @@ $( "#myform" ).validate( { url_input: { required: true, url: true, - normalizer: function( element ) { - var url = element.value; + normalizer: function( value ) { + var url = value; // Check if it doesn't start with http:// or https:// or ftp:// if ( url && url.substr( 0, 7 ) !== "http://" From 9f86ff2f62080ce936586608398e4c6b5d6ab1e5 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Fri, 27 Nov 2015 16:37:25 +0100 Subject: [PATCH 30/91] Entries: jQuery.validator.methods is available since 1.15.0 --- pages/documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/documentation.md b/pages/documentation.md index d671a1b..7c32c7e 100644 --- a/pages/documentation.md +++ b/pages/documentation.md @@ -133,7 +133,7 @@ Some more methods are provided as add-ons, and are currently included in additio You can find the [source code for all additional methods in the GitHub repository](https://github.com/jzaefferer/jquery-validation/tree/master/src/additional). -It is possible to re-define the implementation of the built-in rules using the [`$.validator.methods` property](/jQuery.validator.methods/) +As of 1.15.0 it is possible to re-define the implementation of the built-in rules using the [`$.validator.methods` property](/jQuery.validator.methods/) # [General Guidelines](/reference) From 27fde13eb183531a214a81e0f6a7eb3afacbb9b1 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Fri, 27 Nov 2015 16:50:42 +0100 Subject: [PATCH 31/91] Revert "Entries: jQuery.validator.methods is available since 1.15.0" This reverts commit 9f86ff2f62080ce936586608398e4c6b5d6ab1e5. --- pages/documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/documentation.md b/pages/documentation.md index 7c32c7e..d671a1b 100644 --- a/pages/documentation.md +++ b/pages/documentation.md @@ -133,7 +133,7 @@ Some more methods are provided as add-ons, and are currently included in additio You can find the [source code for all additional methods in the GitHub repository](https://github.com/jzaefferer/jquery-validation/tree/master/src/additional). -As of 1.15.0 it is possible to re-define the implementation of the built-in rules using the [`$.validator.methods` property](/jQuery.validator.methods/) +It is possible to re-define the implementation of the built-in rules using the [`$.validator.methods` property](/jQuery.validator.methods/) # [General Guidelines](/reference) From a830735d0b8468c87e2b5c86c222fd066d8b0d96 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Thu, 25 Feb 2016 10:12:00 +0100 Subject: [PATCH 32/91] Release: Prepare version 1.15.0 --- pages/index.html | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/pages/index.html b/pages/index.html index febd768..8a800b2 100644 --- a/pages/index.html +++ b/pages/index.html @@ -13,12 +13,12 @@

    The plugin is written and maintained by Jörn Zaefferer, a member of the jQuery team, lead developer on the jQuery UI team and maintainer of QUnit. It was started back in the early days of jQuery in 2006, and updated and improved since then.

    -
    Current version: 1.14.0
    +
    Current version: 1.15.0
    License: MIT

    Files:

    -Download -Changelog +Download +Changelog Demos Documentation GitHub Repository @@ -30,23 +30,23 @@

    Installation via Package Managers

    -1.14.0 files on Microsoft's Ajax CDN (hotlinking welcome):

    +1.15.0 files on Microsoft's Ajax CDN (hotlinking welcome):

    Latest files on jsDelivr CDN (hotlinking welcome):

    From bbf31f3d217bbdcb004208ec70bb0672eabfc2be Mon Sep 17 00:00:00 2001 From: Filip Mares Date: Tue, 3 Nov 2015 15:36:22 +0100 Subject: [PATCH 33/91] Entries: Documentation for step method added. Closes #17. --- entries/step-method.xml | 35 +++++++++++++++++++++++++++++++++++ pages/documentation.md | 1 + 2 files changed, 36 insertions(+) create mode 100644 entries/step-method.xml diff --git a/entries/step-method.xml b/entries/step-method.xml new file mode 100644 index 0000000..5202f29 --- /dev/null +++ b/entries/step-method.xml @@ -0,0 +1,35 @@ + + + step method + Makes the element require a given step. + + Works with text inputs. No support for input types: date, datetime, datetime-local, month, time and week. + + + + + Step value required + + + + + Makes "field" required and step of 10. + + + + + diff --git a/pages/documentation.md b/pages/documentation.md index d671a1b..df24e83 100644 --- a/pages/documentation.md +++ b/pages/documentation.md @@ -115,6 +115,7 @@ A set of standard validation methods is provided: * [`min` - Makes the element require a given minimum.](/min-method) * [`max` - Makes the element require a given maximum.](/max-method) * [`range` - Makes the element require a given value range.](/range-method) +* [`step` - Makes the element require a given step.](/step-method) * [`email` - Makes the element require a valid email](/email-method) * [`url` - Makes the element require a valid url](/url-method) * [`date` - Makes the element require a date.](/date-method) From c3da0a2790e96f81b72f4e292f048f12072e4d6c Mon Sep 17 00:00:00 2001 From: Brahim Arkni Date: Sun, 6 Mar 2016 23:14:04 +0000 Subject: [PATCH 34/91] Entries: add missing argument `event` to `submitHandler` docs --- entries/validate.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/entries/validate.xml b/entries/validate.xml index f8dbaf3..853f10c 100644 --- a/entries/validate.xml +++ b/entries/validate.xml @@ -48,6 +48,9 @@ The form currently being validated, as a DOMElement. + + The submit event instance. + From e577ddf5929139dd7c05de39332630651a94f7b0 Mon Sep 17 00:00:00 2001 From: Brahim Arkni Date: Sun, 6 Mar 2016 23:02:54 +0000 Subject: [PATCH 35/91] Documentation: move creditcard method to the list of addons --- pages/documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/documentation.md b/pages/documentation.md index df24e83..ad4b869 100644 --- a/pages/documentation.md +++ b/pages/documentation.md @@ -122,12 +122,12 @@ A set of standard validation methods is provided: * [`dateISO` - Makes the element require an ISO date.](/dateISO-method) * [`number` - Makes the element require a decimal number.](/number-method) * [`digits` - Makes the element require digits only.](/digits-method) -* [`creditcard` - Makes the element require a credit card number.](/creditcard-method) * [`equalTo` - Requires the element to be the same as another one](/equalTo-method) Some more methods are provided as add-ons, and are currently included in additional-methods.js in the download package. Not all of them are documented here: * [`accept` - Makes a file upload accept only specified mime-types.](/accept-method) +* [`creditcard` - Makes the element require a credit card number.](/creditcard-method) * [`extension` - Makes the element require a certain file extension.](/extension-method) * [`phoneUS` - Validate for valid US phone number.](/phoneUS-method) * [`require_from_group` - Ensures a given number of fields in a group are complete.](/require_from_group-method) From 6a6cca0d13a0c1ccff15eaa16c68e910a56b4b39 Mon Sep 17 00:00:00 2001 From: Hugo Date: Tue, 22 Mar 2016 23:09:03 +0200 Subject: [PATCH 36/91] Entries: fixed Typo --- pages/documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/documentation.md b/pages/documentation.md index ad4b869..65ae2b6 100644 --- a/pages/documentation.md +++ b/pages/documentation.md @@ -110,7 +110,7 @@ A set of standard validation methods is provided: * [`required` - Makes the element required.](/required-method) * [`remote` - Requests a resource to check the element for validity.](/remote-method) * [`minlength` - Makes the element require a given minimum length.](/minlength-method) -* [`maxlength` - Makes the element require a given maxmimum length.](/maxlength-method) +* [`maxlength` - Makes the element require a given maximum length.](/maxlength-method) * [`rangelength` - Makes the element require a given value range.](/rangelength-method) * [`min` - Makes the element require a given minimum.](/min-method) * [`max` - Makes the element require a given maximum.](/max-method) From ce3bea5bf7322b194f3437c57fc24df29f7cd87d Mon Sep 17 00:00:00 2001 From: Brahim Arkni Date: Wed, 30 Mar 2016 02:27:23 +0100 Subject: [PATCH 37/91] Index: Add cdnjs links --- pages/index.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pages/index.html b/pages/index.html index 8a800b2..c1d1e8f 100644 --- a/pages/index.html +++ b/pages/index.html @@ -49,6 +49,15 @@

  • http://cdn.jsdelivr.net/jquery.validation/1.15.0/additional-methods.min.js
  • +

    +Latest files on cdnjs CDN (hotlinking welcome):

    + +

    Dependencies

    Required

    From 176c7f6390ed5e04866d272f40502a9f2a6d08ed Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Wed, 30 Mar 2016 09:26:15 +0200 Subject: [PATCH 38/91] Index: removed not working MS CDN links --- pages/index.html | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pages/index.html b/pages/index.html index c1d1e8f..59f6be1 100644 --- a/pages/index.html +++ b/pages/index.html @@ -29,17 +29,6 @@

    Installation via Package Managers

  • NuGet: Install-Package jQuery.Validation
  • -

    -1.15.0 files on Microsoft's Ajax CDN (hotlinking welcome):

    - -

    Latest files on jsDelivr CDN (hotlinking welcome):

      From 6b48ae2c6fd7665d0c5ceb7d2e78ce2de452aec4 Mon Sep 17 00:00:00 2001 From: Brahim Arkni Date: Sun, 10 Apr 2016 14:11:38 +0100 Subject: [PATCH 39/91] Revert "Index: removed not working MS CDN links" This reverts commit 176c7f6390ed5e04866d272f40502a9f2a6d08ed. --- pages/index.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pages/index.html b/pages/index.html index 59f6be1..c1d1e8f 100644 --- a/pages/index.html +++ b/pages/index.html @@ -29,6 +29,17 @@

      Installation via Package Managers

    • NuGet: Install-Package jQuery.Validation
    +

    +1.15.0 files on Microsoft's Ajax CDN (hotlinking welcome):

    + +

    Latest files on jsDelivr CDN (hotlinking welcome):

      From 11b733e733536c770cb7f299c151800292d05927 Mon Sep 17 00:00:00 2001 From: Brahim Arkni Date: Sun, 10 Apr 2016 14:14:02 +0100 Subject: [PATCH 40/91] All: Fix demo resources Fixes jzaefferer/jquery-validation#1743 --- entries2html.xsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entries2html.xsl b/entries2html.xsl index d7a7493..eb2ebe8 100644 --- a/entries2html.xsl +++ b/entries2html.xsl @@ -15,8 +15,8 @@ <body> <form id="myform"></form> <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> -<script src="http://jqueryvalidation.org/files/dist/jquery.validate.min.js"></script> -<script src="http://jqueryvalidation.org/files/dist/additional-methods.min.js"></script> +<script src="http://cdn.jsdelivr.net/jquery.validation/1.15.0/jquery.validate.min.js"></script> +<script src="http://cdn.jsdelivr.net/jquery.validation/1.15.0/additional-methods.min.js"></script> <script> // just for the demos, avoids form submit jQuery.validator.setDefaults({ From 3807cd82a16a72a9187c0f7914a9a316387afdf4 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Mon, 11 Apr 2016 15:09:33 +0200 Subject: [PATCH 41/91] Index: bring mscdn headline in line with other cdn links --- pages/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.html b/pages/index.html index c1d1e8f..b6637f7 100644 --- a/pages/index.html +++ b/pages/index.html @@ -30,7 +30,7 @@

      Installation via Package Managers

    -1.15.0 files on Microsoft's Ajax CDN (hotlinking welcome):

    +Latest files on Microsoft's Ajax CDN (hotlinking welcome):
    • http://ajax.aspnetcdn.com/ajax/jquery.validate/1.15.0/jquery.validate.js
    • http://ajax.aspnetcdn.com/ajax/jquery.validate/1.15.0/jquery.validate.min.js
    • From 483a9676f53efee915d27e53ee1be40531d6cf1d Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Fri, 1 Jul 2016 16:49:29 +0200 Subject: [PATCH 42/91] Entries: Use https for external resource to prevent mixed content blocking --- entries2html.xsl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/entries2html.xsl b/entries2html.xsl index eb2ebe8..a319d64 100644 --- a/entries2html.xsl +++ b/entries2html.xsl @@ -9,14 +9,14 @@ <head> <meta charset="utf-8"> <title></title> -<link rel="stylesheet" href="http://jqueryvalidation.org/files/demo/site-demos.css"> +<link rel="stylesheet" href="https://jqueryvalidation.org/files/demo/site-demos.css"> <style> </style> </head> <body> <form id="myform"></form> -<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> -<script src="http://cdn.jsdelivr.net/jquery.validation/1.15.0/jquery.validate.min.js"></script> -<script src="http://cdn.jsdelivr.net/jquery.validation/1.15.0/additional-methods.min.js"></script> +<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script> +<script src="https://cdn.jsdelivr.net/jquery.validation/1.15.0/jquery.validate.min.js"></script> +<script src="https://cdn.jsdelivr.net/jquery.validation/1.15.0/additional-methods.min.js"></script> <script> // just for the demos, avoids form submit jQuery.validator.setDefaults({ From e9a132cf0969ad7e64649eacb9b7e9f67d58dc62 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 12 Jul 2016 14:44:29 +0200 Subject: [PATCH 43/91] Entries: use domain relative urls instead of absolute urls this prevents mixed-content problems. --- entries/remote-method.xml | 2 +- pages/index.html | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/entries/remote-method.xml b/entries/remote-method.xml index 544af16..7929b78 100644 --- a/entries/remote-method.xml +++ b/entries/remote-method.xml @@ -5,7 +5,7 @@ The serverside resource is called via jQuery.ajax (XMLHttpRequest) and gets a key/value pair corresponding to the name of the validated element and its value as a GET parameter. The serverside response must be a JSON string that must be "true" for valid elements, and can be "false", undefined, or null for invalid elements, using the default error message. If the serverside response is a string, eg. "That name is already taken, try peter123 instead", this string will be displayed as a custom error message in place of the default. -

      For more examples, take a look the marketo demo and the milk demo.

      +

      For more examples, take a look the marketo demo and the milk demo.

      diff --git a/pages/index.html b/pages/index.html index b6637f7..43409c4 100644 --- a/pages/index.html +++ b/pages/index.html @@ -17,10 +17,10 @@
      License: MIT

      Files:

      -Download +Download Changelog -Demos -Documentation +Demos +Documentation GitHub Repository

      Installation via Package Managers

      From 6fb08fdfcb2a5c445b491cf2ef8f703424ed5a62 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 12 Jul 2016 14:45:57 +0200 Subject: [PATCH 44/91] Pages: Use https urls in markdown files Prevent mixed content problems --- pages/documentation.md | 12 ++++++------ pages/reference.md | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pages/documentation.md b/pages/documentation.md index 65ae2b6..37e8430 100644 --- a/pages/documentation.md +++ b/pages/documentation.md @@ -11,7 +11,7 @@ You may need different ways to specify validation rules according to the server- **"But aren't there already a ton of validation plugins out there?"** Right, there are a lot of non-jQuery-based solutions (which you'd avoid since you found jQuery) and some jQuery-based solutions. This particular one is one of the oldest jQuery plugins (started in July 2006) and has proved itself in projects all around the world. There is also an [article](http://bassistance.de/2007/07/04/about-client-side-form-validation-and-frameworks/) discussing how this plugin fits the bill of the should-be validation solution. -Not convinced? [Have a look at this example](http://jqueryvalidation.org/files/demo/): +Not convinced? [Have a look at this example](https://jqueryvalidation.org/files/demo/):
      
       
      @@ -175,8 +175,8 @@ So the correct code looks slightly different:
       
       # Demos
       
      -## [The Marketo sign-up form](http://jqueryvalidation.org/files/demo/marketo/)
      -### [The Marketo sign-up form, step 2](http://jqueryvalidation.org/files/demo/marketo/step2.htm)
      +## [The Marketo sign-up form](https://jqueryvalidation.org/files/demo/marketo/)
      +### [The Marketo sign-up form, step 2](https://jqueryvalidation.org/files/demo/marketo/step2.htm)
       Based on an old version of the marketo.com sign-up form. The custom validation was once replaced with this plugin. Thanks to Glen Lipka for contributing it!
       
       *Notable features of the demo:*
      @@ -187,7 +187,7 @@ Based on an old version of the marketo.com sign-up form. The custom validation w
       * A custom method for making the billing address on step 2 optional when "Same as Company Address" is checked
       * A custom method for checking the password: Checks that the password contains at least one number and one character and that it is at least 6 characters long. If the user blurs the field with an invalid value, the input is emptied and gets focus again.
       
      -## [The Remember The Milk sign-up form](http://jqueryvalidation.org/files/demo/milk/)
      +## [The Remember The Milk sign-up form](https://jqueryvalidation.org/files/demo/milk/)
       The sign-up form from rememberthemilk.com (based on an older version). The custom validation was replaced using this plugin. Thanks to RTM for contributing!
       
       *Notable features of the demo:*
      @@ -195,7 +195,7 @@ The sign-up form from rememberthemilk.com (based on an older version). The custo
       * Custom message display, based on the original table layout, using success option to display a checkmark for valid fields
       * Remote validation of username, to check if it is already taken (try "Peter", "asdf" or "George")
       
      -## [A multipart "buy&sell a house" form](http://jqueryvalidation.org/files/demo/multipart/)
      +## [A multipart "buy&sell a house" form](https://jqueryvalidation.org/files/demo/multipart/)
       Contributed by Michael Evangelista, showing a multipart form for buying and selling houses.
       
       *Notable features of the demo:*
      @@ -203,7 +203,7 @@ Contributed by Michael Evangelista, showing a multipart form for buying and sell
       * Multipart, implemented using the jQuery UI accordion and a custom method to check if an element is on the current page when validated
       * Integration with masked-input plugin, see Phone and Zip fields
       
      -## [Using remote validation to help with captchas](http://jqueryvalidation.org/files/demo/captcha/)
      +## [Using remote validation to help with captchas](https://jqueryvalidation.org/files/demo/captcha/)
       Features remote validation for helping the user to fill out captchas.
       
       *Notable features of the demo:*
      diff --git a/pages/reference.md b/pages/reference.md
      index c124888..052c448 100644
      --- a/pages/reference.md
      +++ b/pages/reference.md
      @@ -106,7 +106,7 @@ To skip validation while still using a submit-button, add the attribte "formnova
       
       This used to work by adding `class="cancel"` to the input, this is now deprecated.
       
      -[Demo for the cancel button](http://jqueryvalidation.org/files/demo/errorcontainer-demo.html)
      +[Demo for the cancel button](https://jqueryvalidation.org/files/demo/errorcontainer-demo.html)
       
       # Validation event
       By default, forms are validated on submit, triggered by the user clicking the submit button or pressing enter when a form input is focused (option `onsubmit`). In addition, once a field was highlighted as being invalid, it is validated whenever the user types something in the field (option `onkeyup`). When the user enters something invalid into a valid field, it is also validated when the field loses focus (option `onblur`).
      
      From e413808500c962a7411e609e8227fcfc53e51d16 Mon Sep 17 00:00:00 2001
      From: sparky672 
      Date: Fri, 6 May 2016 09:35:10 -0500
      Subject: [PATCH 45/91] Entries: Changed generic form selector
      
      Some examples on this page are using `$(".selector").validate()` and others are using `$("#myform").validate()`.
      
      Using `$(".selector")` implies that `.validate()` can be directly attached to a class selector where, if this is done without using an `.each()`, it would only be attached to the first instance of this class.
      
      The `$(".selector")` should be changed into `$("#myform")` on the entire page for better consistency and less confusion.  I think `$("#myform")` is more appropriate since the `.validate()` method should only be attached to a selector that represents a single `form` element.
      
      Closes #24.
      ---
       entries/validate.xml | 46 ++++++++++++++++++++++----------------------
       1 file changed, 23 insertions(+), 23 deletions(-)
      
      diff --git a/entries/validate.xml b/entries/validate.xml
      index 853f10c..5f2f9b2 100644
      --- a/entries/validate.xml
      +++ b/entries/validate.xml
      @@ -16,7 +16,7 @@
       					Enables debug mode. If true, the form is not submitted and certain errors are displayed on the console (will check if a window.console property exists). Try to enable when a form is just submitted instead of validation stopping the submit.
       					

      Example: Prevents the form from submitting and tries to help setting up the validation with warnings about missing methods and other debug messages.

      
      -					$(".selector").validate({
      +					$("#myform").validate({
       						debug: true
       					});
       					
      @@ -28,7 +28,7 @@ Callback for handling the actual submit when the form is valid. Gets the form as the only argument. Replaces the default submit. The right place to submit a form via Ajax after it is validated.

      Example: Submits the form via Ajax when valid.

      
      -					$(".selector").validate({
      +					$("#myform").validate({
       						submitHandler: function(form) {
       							$(form).ajaxSubmit();
       						}
      @@ -36,7 +36,7 @@
       					

      Example: Use submitHandler to process something and then using the default submit. Note that "form" refers to a DOM element, this way the validation isn't triggered again.

      
      -					$(".selector").validate({
      +					$("#myform").validate({
       						submitHandler: function(form) {
       							// do other things for a valid form
       							form.submit();
      @@ -58,7 +58,7 @@
       					Callback for custom code when an invalid form is submitted. Called with an event object as the first argument, and the validator as the second.
       					

      Example: Displays a message above the form, indicating how many fields are invalid when the user tries to submit an invalid form.

      
      -					$(".selector").validate({
      +					$("#myform").validate({
       						invalidHandler: function(event, validator) {
       							// 'this' refers to the form
       							var errors = validator.numberOfInvalids();
      @@ -101,7 +101,7 @@
       					Key/value pairs defining custom rules. Key is the name of an element (or a group of checkboxes/radio buttons), value is an object consisting of rule/parameter pairs or a plain String. Can be combined with class/attribute/data rules. Each rule can be specified as having a depends-property to apply the rule only in certain conditions. See the second example below for details.
       					

      Example: Specifies a name element as required and an email element as required (using the shortcut for a single rule) and a valid email address (using another object literal).

      
      -					$(".selector").validate({
      +					$("#myform").validate({
       						rules: {
       							// simple rule, converted to {required:true}
       							name: "required",
      @@ -115,7 +115,7 @@
       					

      Example: Specifies a contact element as required and as email address, the latter depending on a checkbox being checked for contact via email.

      
      -					$(".selector").validate({
      +					$("#myform").validate({
       						rules: {
       							contact: {
       								required: true,
      @@ -130,7 +130,7 @@
       					

      Example: Configure a rule that requires a parameter, along with a depends callback.

      
      -					$(".selector").validate({
      +					$("#myform").validate({
       						rules: {
       							// at least 15€ when bonus material is included
       							pay_what_you_want: {
      @@ -154,7 +154,7 @@
       					Key/value pairs defining custom messages. Key is the name of an element, value the message to display for that element. Instead of a plain message, another map with specific messages for each rule can be used. Overrides the title attribute of an element or the default message for the method (in that order). Each message can be a String or a Callback. The callback is called in the scope of the validator, with the rule's parameters as the first argument and the element as the second, and must return a String to display as the message.
       					

      Example: Specifies a name element as required and an email element as required and a valid email address. A single message is specified for the name element, and two messages for email.

      
      -					$(".selector").validate({
      +					$$("#myform").validate({
       						rules: {
       							name: "required",
       							email: {
      @@ -173,7 +173,7 @@
       					

      Example: Validates the name-field as required and having at least two characters. Provides a callback message using jQuery.validator.format to avoid having to specify the parameter in two places.

      
      -					$(".selector").validate({
      +					$("#myform").validate({
       						rules: {
       							name: {
       								required: true,
      @@ -219,7 +219,7 @@
       					

      A boolean true is not a valid value.

      Example: Disables onsubmit validation, allowing the user to submit whatever he wants, while still validating on keyup/blur/click events (if not specified otherwise).

      
      -					$(".selector").validate({
      +					$("#myform").validate({
       						onsubmit: false
       					});
       					
      @@ -233,7 +233,7 @@

      A boolean true is not a valid value.

      Example: Disables onblur validation.

      
      -					$(".selector").validate({
      +					$("#myform").validate({
       						onfocusout: false
       					});
       					
      @@ -255,7 +255,7 @@

      A boolean true is not a valid value.

      Example: Disables onkeyup validation.

      
      -					$(".selector").validate({
      +					$("#myform").validate({
       						onkeyup: false
       					});
       					
      @@ -277,7 +277,7 @@

      A boolean true is not a valid value.

      Example: Disables onclick validation of checkboxes and radio buttons.

      
      -					$(".selector").validate({
      +					$("#myform").validate({
       						onclick: false
       					});
       					
      @@ -297,7 +297,7 @@ Focus the last active or first invalid element on submit via validator.focusInvalid(). The last active element is the one that had focus when the form was submitted, avoiding stealing its focus. If there was no element focused, the first one in the form gets it, unless this option is turned off.

      Example: Disables focusing of invalid elements.

      
      -					$(".selector").validate({
      +					$("#myform").validate({
       						focusInvalid: false
       					});
       					
      @@ -309,7 +309,7 @@ If enabled, removes the errorClass from the invalid elements and hides all error messages whenever the element is focused. Avoid combination with focusInvalid.

      Example: Enables cleanup when focusing elements, removing the error class and hiding error messages when an element is focused.

      
      -					$(".selector").validate({
      +					$("#myform").validate({
       						focusCleanup: true
       					});
       					
      @@ -321,7 +321,7 @@ Use this class to create error labels, to look for existing error labels and to add it to invalid elements.

      Example: Sets the error class to "invalid".

      
      -					$(".selector").validate({
      +					$("#myform").validate({
       						errorClass: "invalid"
       					});
       					
      @@ -333,7 +333,7 @@ This class is added to an element after it was validated and considered valid.

      Example: Sets the valid class to "success".

      
      -					$(".selector").validate({
      +					$("#myform").validate({
       						validClass: "success"
       					});
       					
      @@ -345,7 +345,7 @@ Use this element type to create error messages and to look for existing error messages. The default, "label", has the advantage of creating a meaningful link between error message and invalid field using the for attribute (which is always used, regardless of element type).

      Example: Sets the error element to "em".

      
      -					$(".selector").validate({
      +					$("#myform").validate({
       						errorElement: "em"
       					});
       					
      @@ -357,7 +357,7 @@ Wrap error labels with the specified element. Useful in combination with errorLabelContainer to create a list of error messages.

      Example: Wrap each error element with a list item, useful when using an ordered or unordered list as the error container.

      
      -					$(".selector").validate({
      +					$("#myform").validate({
       						wrapper: "li"
       					});
       					
      @@ -398,7 +398,7 @@ A custom message display handler. Gets the map of errors as the first argument and an array of errors as the second, called in the context of the validator object. The arguments contain only those elements currently validated, which can be a single element when doing validation onblur/keyup. You can trigger (in addition to your own messages) the default behaviour by calling this.defaultShowErrors().

      Example: Update the number of invalid elements each time an error is displayed. Delegates to the default implementation for the actual error display.

      
      -					$(".selector").validate({
      +					$("#myform").validate({
       						showErrors: function(errorMap, errorList) {
       							$("#summary").html("Your form contains "
       								+ this.numberOfInvalids()
      @@ -479,7 +479,7 @@
       					How to highlight invalid fields. Override to decide which fields and how to highlight.
       					

      Example: Highlights an invalid element by fading it out and in again.

      
      -					$(".selector").validate({
      +					$("#myform").validate({
       						highlight: function(element, errorClass) {
       							$(element).fadeOut(function() {
       								$(element).fadeIn();
      @@ -489,7 +489,7 @@
       					

      Example: Adds the error class to both the invalid element and its label

      
      -					$(".selector").validate({
      +					$("#myform").validate({
       						highlight: function(element, errorClass, validClass) {
       							$(element).addClass(errorClass).removeClass(validClass);
       							$(element.form).find("label[for=" + element.id + "]")
      @@ -526,7 +526,7 @@
       					Set to skip reading messages from the title attribute, helps to avoid issues with Google Toolbar; default is false for compability, the message-from-title is likely to be completely removed in a future release.
       					

      Example: Configure the plugin to ignore title attributes on validated elements when looking for messages.

      
      -					$(".selector").validate({
      +					$("#myform").validate({
       						ignoreTitle: true
       					});
       					
      From 227a3126ae31d6a639b0759f9e2849e1fed1a9ad Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Fri, 22 Jul 2016 18:04:14 +0200 Subject: [PATCH 46/91] Index: Updated homepage for the 1.15.1 release --- pages/index.html | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/pages/index.html b/pages/index.html index 43409c4..d47d005 100644 --- a/pages/index.html +++ b/pages/index.html @@ -13,12 +13,12 @@

      The plugin is written and maintained by Jörn Zaefferer, a member of the jQuery team, lead developer on the jQuery UI team and maintainer of QUnit. It was started back in the early days of jQuery in 2006, and updated and improved since then.

      -
      Current version: 1.15.0
      +
      Current version: 1.15.1
      License: MIT

      Files:

      -Download -Changelog +Download +Changelog Demos Documentation GitHub Repository @@ -32,30 +32,30 @@

      Installation via Package Managers

      Latest files on Microsoft's Ajax CDN (hotlinking welcome):

      Latest files on jsDelivr CDN (hotlinking welcome):

      Latest files on cdnjs CDN (hotlinking welcome):

      From 049a8c16bf2da6045274f2e0c2bae73fcb30ab9c Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Mon, 25 Jul 2016 09:14:36 +0200 Subject: [PATCH 47/91] Index: remove links to MS cdn its the only one which is managed manually. we promote only the automatically deployed ones as of now to speed up our own release process. --- pages/index.html | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pages/index.html b/pages/index.html index d47d005..d703411 100644 --- a/pages/index.html +++ b/pages/index.html @@ -29,17 +29,6 @@

      Installation via Package Managers

    • NuGet: Install-Package jQuery.Validation
    -

    -Latest files on Microsoft's Ajax CDN (hotlinking welcome):

    - -

    Latest files on jsDelivr CDN (hotlinking welcome):

      From 412768739ad2fbca80076b30993e844d67254c59 Mon Sep 17 00:00:00 2001 From: sparky672 Date: Tue, 12 Jul 2016 13:48:15 -0500 Subject: [PATCH 48/91] Reference: clarified markup recommendations. Clarified this section to reflect many questions on StackOverflow. It's a common mistake to leave out or duplicate the `name` attribute. It's also a common misconception that an `id` is needed at all for this plugin to work. Nowhere in the documentation is it explicitly stated that `name` attribute must be unique...only implied. Closes #25. --- pages/reference.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pages/reference.md b/pages/reference.md index 052c448..ede64ec 100644 --- a/pages/reference.md +++ b/pages/reference.md @@ -10,14 +10,15 @@ To achieve this, it is important that the plugin is actually deployed on website The plugin can never replace serverside validation and doesn't intend to do so. Having both in place gives you the necessary security for your application, as well as improved usability. # Markup recommendations -Each input has a label associated with it: The for-attribute of the label refers to the id-attribute of the input. +Mandated: A 'name' attribute is required for all input elements needing validation, and the plugin will not work without this. A 'name' attribute must also be unique to the form, as this is how the plugin keeps track of all input elements. However, each group of radio or checkbox elements will share the same 'name' since the value of this grouping represents a single piece of the form data. + +Optionally: Each input can have a label associated with it, where the 'for' attribute of the label refers to the 'id' attribute of the input. It's also a common practice to have 'id' and 'name' attributes with the same value, although keep in mind that since this plugin does not use the 'id' attribute, this is not mandatory. + ```html ``` -The name attribute is '''required''' for input elements, the validation plugin doesn't work without it. Usually name and id attributes should have the same value. - # Methods A validation method implements the logic to validate any element. Provided are a set of default validation methods, such as required. Apart from required itself and equalTo, all validation methods declare an element valid when it has no value at all. That way an email field is optional unless required is specified. You can specify an element input to contain a valid email address, or nothing at all. Use jQuery.validator.addMethod to implement custom methods. From 334593a3453a8d76bffb73cea881cfc0c9200ecc Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Thu, 1 Sep 2016 14:03:31 +0200 Subject: [PATCH 49/91] Index: added link to NPM --- pages/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/pages/index.html b/pages/index.html index d703411..427637b 100644 --- a/pages/index.html +++ b/pages/index.html @@ -27,6 +27,7 @@

      Installation via Package Managers

      • Bower: bower install jquery-validation
      • NuGet: Install-Package jQuery.Validation
      • +
      • NPM: npm i jquery-validation

      From 3b1bfef9e2062dfa4d6870a93de17bd6e2f40a70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Wo=C5=82k?= Date: Thu, 20 Oct 2016 15:48:44 +0200 Subject: [PATCH 50/91] Entries: .validate()'s submitHandler arguments description fix --- entries/validate.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entries/validate.xml b/entries/validate.xml index 5f2f9b2..f100364 100644 --- a/entries/validate.xml +++ b/entries/validate.xml @@ -43,7 +43,7 @@ } });

    -

    The callback gets passed one argument:

    +

    The callback gets passed two arguments:

    The form currently being validated, as a DOMElement. From 29eed980b3aca6f90ac5f354d7c7715b6f33237e Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Fri, 2 Dec 2016 13:41:13 +0100 Subject: [PATCH 51/91] Update links for the newly released 1.16.0 version. --- pages/index.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pages/index.html b/pages/index.html index 427637b..b1b2d35 100644 --- a/pages/index.html +++ b/pages/index.html @@ -13,12 +13,12 @@

    The plugin is written and maintained by Jörn Zaefferer, a member of the jQuery team, lead developer on the jQuery UI team and maintainer of QUnit. It was started back in the early days of jQuery in 2006, and updated and improved since then.

    -
    Current version: 1.15.1
    +
    Current version: 1.16.0
    License: MIT

    Files:

    -Download -Changelog +Download +Changelog Demos Documentation GitHub Repository @@ -33,19 +33,19 @@

    Installation via Package Managers

    Latest files on jsDelivr CDN (hotlinking welcome):

    Latest files on cdnjs CDN (hotlinking welcome):

    From 2ae95171480e2f1aa8262e17b7a0ca398d30e596 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Fri, 2 Dec 2016 13:54:51 +0100 Subject: [PATCH 52/91] Home: Mention jquery3.x support --- pages/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.html b/pages/index.html index b1b2d35..8aaf580 100644 --- a/pages/index.html +++ b/pages/index.html @@ -52,7 +52,7 @@

    Dependencies

    Required

    Support

    From 29ff1299000f466e0e3ff82195ca28765152af90 Mon Sep 17 00:00:00 2001 From: sparky672 Date: Sun, 25 Dec 2016 09:45:17 -0600 Subject: [PATCH 53/91] Entries: ref. source location in extension-method.xml (#27) Many questions on StackOverflow are triggered by errors caused by users not knowing that this method is part of the Additional Methods file. This is a matter of fact and should be included in the documentation. --- entries/extension-method.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/entries/extension-method.xml b/entries/extension-method.xml index e4bd077..0e8ec9a 100644 --- a/entries/extension-method.xml +++ b/entries/extension-method.xml @@ -5,6 +5,7 @@ Returns true if the value ends with one of the specified file extensions. If nothing is specified, only images are allowed (png, jpeg, gif).

    Works with text inputs.

    +

    Part of the additional-methods.js file

    From e0385f195acd9e460c1f4ee322d0c97b4c6662b2 Mon Sep 17 00:00:00 2001 From: sparky672 Date: Sun, 25 Dec 2016 09:46:23 -0600 Subject: [PATCH 54/91] Entries: ref. source location in require_from_group-method.xml (#31) Many questions on StackOverflow are triggered by errors caused by users not knowing that this method is part of the Additional Methods file. This is a matter of fact and should be included in the documentation. --- entries/require_from_group-method.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/entries/require_from_group-method.xml b/entries/require_from_group-method.xml index 82e3d4c..b389026 100644 --- a/entries/require_from_group-method.xml +++ b/entries/require_from_group-method.xml @@ -8,6 +8,7 @@ group. Then apply this rule to all the fields within the group. The form then cannot be submitted until at least the minimum number have been completed. +

    Part of the additional-methods.js file

    Within a group of three phone numbers, ensure at least one is complete. From ecba881cbc64ae93e94bf3f5202f6c8e13cbbe96 Mon Sep 17 00:00:00 2001 From: sparky672 Date: Sun, 25 Dec 2016 09:47:23 -0600 Subject: [PATCH 55/91] Entries: ref. source location in phoneUS-method.xml (#30) Many questions on StackOverflow are triggered by errors caused by users not knowing that this method is part of the Additional Methods file. This is a matter of fact and should be included in the documentation. --- entries/phoneUS-method.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/entries/phoneUS-method.xml b/entries/phoneUS-method.xml index 3dc7956..3490c7e 100644 --- a/entries/phoneUS-method.xml +++ b/entries/phoneUS-method.xml @@ -4,6 +4,7 @@ Validate for valid US phone number. Works with text inputs. +

    Part of the additional-methods.js file

    Makes "field" required and a US phone number. From 12b0be1b44aa472c6b667a07c7bca3fbf017f5e9 Mon Sep 17 00:00:00 2001 From: sparky672 Date: Sun, 25 Dec 2016 09:48:09 -0600 Subject: [PATCH 56/91] Entries: ref. source location in accept-method.xml (#28) Many questions on StackOverflow are triggered by errors caused by users not knowing that this method is part of the Additional Methods file. This is a matter of fact and should be included in the documentation. --- entries/accept-method.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entries/accept-method.xml b/entries/accept-method.xml index b713cd8..529c1a0 100644 --- a/entries/accept-method.xml +++ b/entries/accept-method.xml @@ -10,7 +10,7 @@

    You can specify multiple mime-types by separating them with a comma, e.g. "image/x-eps,application/pdf".

    Works with type="file" inputs.

    - +

    Part of the additional-methods.js file

    Note: This method used to look at just the filename, specifically the file extension. That behaviour is now available as the "extension" method inside src/additional/extension.js.

    From 2f51f061510066b11d81acf81fbd79defba3f007 Mon Sep 17 00:00:00 2001 From: sparky672 Date: Sun, 25 Dec 2016 09:48:56 -0600 Subject: [PATCH 57/91] Entries: ref. source location in creditcard-method.xml (#29) Many questions on StackOverflow are triggered by errors caused by users not knowing that this method is part of the Additional Methods file. This is a matter of fact and should be included in the documentation. --- entries/creditcard-method.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/entries/creditcard-method.xml b/entries/creditcard-method.xml index eacb2f8..14a18f5 100644 --- a/entries/creditcard-method.xml +++ b/entries/creditcard-method.xml @@ -5,6 +5,7 @@ Return true if the value is a valid credit card number.

    Works with text inputs.

    +

    Part of the additional-methods.js file

    Note: The algorithm used can't verify the validity of the number - it is just an integrity check. As with any other clientside validation, you have to implement the same or better validation on the serverside.

    From 23a3c4f47873287322d86bd59a8731199c01a46b Mon Sep 17 00:00:00 2001 From: d-ph Date: Thu, 2 Feb 2017 16:49:14 +0000 Subject: [PATCH 58/91] Entries: Add docs for `Validator.destroy()` on the webpage. (#32) Closes #1912. --- entries/Validator.destroy.xml | 28 ++++++++++++++++++++++++++++ pages/documentation.md | 1 + 2 files changed, 29 insertions(+) create mode 100644 entries/Validator.destroy.xml diff --git a/entries/Validator.destroy.xml b/entries/Validator.destroy.xml new file mode 100644 index 0000000..89c9714 --- /dev/null +++ b/entries/Validator.destroy.xml @@ -0,0 +1,28 @@ + + + + Validator.destroy() + + + Destroys this instance of validator freeing up resources and unregistering events. + This is only useful, when you need to clean up after the validator in a Single Page Application. + + Destroying an instance of validator. + + + + diff --git a/pages/documentation.md b/pages/documentation.md index 37e8430..97fa99f 100644 --- a/pages/documentation.md +++ b/pages/documentation.md @@ -95,6 +95,7 @@ The validate method returns a Validator object that has a few public methods tha * [`Validator.resetForm()` - Resets the controlled form.](/Validator.resetForm) * [`Validator.showErrors()` - Show the specified messages.](/Validator.showErrors) * [`Validator.numberOfInvalids()` - Returns the number of invalid fields.](/Validator.numberOfInvalids) +* [`Validator.destroy()` - Destroys this instance of validator.](/Validator.destroy) There are a few static methods on the validator object: From 8fbebbdf8abb77a4b2f1bc41ff973031bed35042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Wo=C5=82k?= Date: Thu, 2 Feb 2017 17:49:49 +0100 Subject: [PATCH 59/91] Entries: submitHandler arguments description fix (#26) From 66f321ffce4240bed054eb538264afd88c1dae74 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Sat, 11 Mar 2017 11:03:59 +0100 Subject: [PATCH 60/91] Home: https all the things --- pages/index.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pages/index.html b/pages/index.html index 8aaf580..687b0d7 100644 --- a/pages/index.html +++ b/pages/index.html @@ -7,11 +7,11 @@

    For a quick overview of what this plugin provides, check out this Webucator video (they also provide jQuery trainings):

    -

    If you use this plugin, you should support the ongoing development by donating to the pledgie.org campagin.

    +

    If you use this plugin, you should support the ongoing development by donating to the pledgie.org campagin.

    -Click here to lend your support to: jQuery Validation Plugin and make a donation +Click here to lend your support to: jQuery Validation Plugin and make a donation -

    The plugin is written and maintained by Jörn Zaefferer, a member of the jQuery team, lead developer on the jQuery UI team and maintainer of QUnit. It was started back in the early days of jQuery in 2006, and updated and improved since then.

    +

    The plugin is written and maintained by Jörn Zaefferer, a member of the jQuery team, lead developer on the jQuery UI team and maintainer of QUnit. It was started back in the early days of jQuery in 2006, and updated and improved since then.

    Current version: 1.16.0
    License: MIT
    @@ -31,12 +31,12 @@

    Installation via Package Managers

    -Latest files on jsDelivr CDN (hotlinking welcome):

    +Latest files on jsDelivr CDN (hotlinking welcome):

    @@ -52,14 +52,14 @@

    Dependencies

    Required

    Support

      -
    • Please post questions to the official using jQuery Plugins Forum, tagging your question with (at least) "validate". Keep your question short and succinct and provide code when possible; a testpage makes it much more likely that you get an useful answer in a shorter time.
    • +
    • Please post questions to the official using jQuery Plugins Forum, tagging your question with (at least) "validate". Keep your question short and succinct and provide code when possible; a testpage makes it much more likely that you get an useful answer in a shorter time.
    • Please post bug reports and other contributions (enhancements, features, eg. new validation methods) to the GitHub issue tracker

    Donate

    -Click here to lend your support to: jQuery Validation Plugin and make a donation at www.pledgie.com ! +Click here to lend your support to: jQuery Validation Plugin and make a donation at www.pledgie.com ! From 901413edd5c5aa112334d5a91995861531fbe824 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Sat, 11 Mar 2017 11:44:25 +0100 Subject: [PATCH 61/91] Readme: reference more up2date xsl* tools refs https://github.com/jquery/api.jquery.com/issues/71 and fixes "Error: Unknown option --path" xsltproc errors --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7c3ecff..dc38c2e 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ jqueryvalidation-content * libxml2 * libxslt -The `xmllint` and `xsltproc` utilities need to be in your path. If you are on Windows, you can get libxml2 and libxslt from GnuWin32. +The `xmllint` and `xsltproc` utilities need to be in your path. If you are on Windows, you can get libxml2 and libxslt from GnuWin32. * Install [WordPress](http://wordpress.org/download/) * Install [jqueryvalidation-theme](https://github.com/jzaefferer/validation-theme) - clone that repo, then symlink it into your `wp-content/themes` folder From 496b8dbe866d88d5e8cd9b603e2e0f6360517f20 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Sat, 11 Mar 2017 12:12:13 +0100 Subject: [PATCH 62/91] Updated sample config with more recent settings Especially added http-basic auth --- config-sample.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config-sample.json b/config-sample.json index ba43644..fc44401 100644 --- a/config-sample.json +++ b/config-sample.json @@ -1,5 +1,9 @@ { - "url": "validation.local", + "url": "https://jqueryvalidation.org/", "username": "admin", - "password": "secret" + "password": "secret", + "basicAuth": { + "username": "basic-auth-admin", + "password": "basic-auth-secret" + } } From f3f7499625d78a8bc79f2e807249e3fc4f31d949 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Sat, 11 Mar 2017 12:22:40 +0100 Subject: [PATCH 63/91] Readme: document the hacks required to get deployment work --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index dc38c2e..84eed8a 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,13 @@ In this repo: * run `npm install -g grunt-cli` * run `npm install` +### Hacks + +* Make sure your local `wordpress` nodejs module contains [this commit](https://github.com/scottgonzalez/node-wordpress/commit/2b19238cf8064dafb66b9db09d0adcc9eac7f724) +* Make sure your local config contains + * rpc-auth and basic-auth credentials + * a https jqueryvalidation url + ### Deploy `grunt deploy` From 835394e71806faac1724a19ebb07174344ab881d Mon Sep 17 00:00:00 2001 From: Brahim Arkni Date: Wed, 12 Apr 2017 16:50:51 +0100 Subject: [PATCH 64/91] All: Update links after move to organization --- LICENSE-MIT.txt | 2 +- package.json | 6 +++--- pages/contribute.md | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/LICENSE-MIT.txt b/LICENSE-MIT.txt index 8f3d8cf..61daee1 100644 --- a/LICENSE-MIT.txt +++ b/LICENSE-MIT.txt @@ -2,7 +2,7 @@ Copyright (c) 2013 Jörn Zaefferer, http://bassistance.de/ This software consists of voluntary contributions made by many individuals. For exact contribution history, see the revision history -and logs, available at http://github.com/jzaefferer/jqueryvalidation-content +and logs, available at https://github.com/jquery-validation/jqueryvalidation-content Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/package.json b/package.json index bad9a06..3613364 100644 --- a/package.json +++ b/package.json @@ -3,16 +3,16 @@ "title": "jQuery Validation Plugin site content", "description": "Site content for the jQuery Validation Plugin", "version": "1.0.0", - "homepage": "http://http://jqueryvalidation.org/", + "homepage": "https://jqueryvalidation.org/", "author": { "name": "Jörn Zaefferer (http://bassistance.de/)" }, "repository": { "type": "git", - "url": "git://github.com/jzaefferer/jqueryvalidation-content.git" + "url": "git://github.com/jquery-validation/validation-content.git" }, "bugs": { - "url": "https://github.com/jzaefferer/jqueryvalidation-content/issues" + "url": "https://github.com/jquery-validation/validation-content/issues" }, "licenses": [ { diff --git a/pages/contribute.md b/pages/contribute.md index 4c2cf3c..03c99b8 100644 --- a/pages/contribute.md +++ b/pages/contribute.md @@ -4,8 +4,8 @@ There are several ways for you to contribute to this plugin: -* Help [with the code](https://github.com/jzaefferer/jquery-validation/). Fix bugs, propose features, translate messages and methods... -* Help [with the site content](https://github.com/jzaefferer/validation-content). Improve API documentation, examples, references... -* Help [with the site theme](https://github.com/jzaefferer/validation-theme). This is a WordPress theme that still needs a lot of improvements. +* Help [with the code](https://github.com/jquery-validation/jquery-validation/). Fix bugs, propose features, translate messages and methods... +* Help [with the site content](https://github.com/jquery-validation/validation-content). Improve API documentation, examples, references... +* Help [with the site theme](https://github.com/jquery-validation/validation-theme). This is a WordPress theme that still needs a lot of improvements. The majority of contributions can be viewed under [jQuery's contribute site](http://contribute.jquery.org/) - the style guides et al apply to this project as well. \ No newline at end of file From ac17b18de13488b1b5d302bea8b85223a8554935 Mon Sep 17 00:00:00 2001 From: Brahim Arkni Date: Wed, 12 Apr 2017 16:51:26 +0100 Subject: [PATCH 65/91] Entries: Use https --- entries/remote-method.xml | 2 +- entries/unchecked-selector.xml | 4 ++-- package.json | 2 +- pages/contribute.md | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/entries/remote-method.xml b/entries/remote-method.xml index 7929b78..8ed7288 100644 --- a/entries/remote-method.xml +++ b/entries/remote-method.xml @@ -10,7 +10,7 @@ - For the URL of the resource to request for serverside validation (String) or options to fully customize the request, see jQuery.ajax for details. + For the URL of the resource to request for serverside validation (String) or options to fully customize the request, see jQuery.ajax for details.

    These options deep-extend the defaults (dataType:"json", data:{nameOfTheElement:valueOfTheElement}). Any options you provide will override the defaults.

    diff --git a/entries/unchecked-selector.xml b/entries/unchecked-selector.xml index e70c170..427918a 100644 --- a/entries/unchecked-selector.xml +++ b/entries/unchecked-selector.xml @@ -6,7 +6,7 @@
    Selects all elements that are unchecked. - Inversion of :checked. + Inversion of :checked. Finds all input elements that are unchecked. @@ -35,4 +35,4 @@ div { color:red; } ]]> - \ No newline at end of file + diff --git a/package.json b/package.json index 3613364..77f8011 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "licenses": [ { "type": "MIT", - "url": "http://www.opensource.org/licenses/MIT" + "url": "https://opensource.org/licenses/MIT" } ], "dependencies": { diff --git a/pages/contribute.md b/pages/contribute.md index 03c99b8..6b403a0 100644 --- a/pages/contribute.md +++ b/pages/contribute.md @@ -8,4 +8,4 @@ There are several ways for you to contribute to this plugin: * Help [with the site content](https://github.com/jquery-validation/validation-content). Improve API documentation, examples, references... * Help [with the site theme](https://github.com/jquery-validation/validation-theme). This is a WordPress theme that still needs a lot of improvements. -The majority of contributions can be viewed under [jQuery's contribute site](http://contribute.jquery.org/) - the style guides et al apply to this project as well. \ No newline at end of file +The majority of contributions can be viewed under [jQuery's contribute site](https://contribute.jquery.org/) - the style guides et al apply to this project as well. From c3de061ff9783e5d99c9343a2045e3789d0e7f80 Mon Sep 17 00:00:00 2001 From: Brahim Arkni Date: Wed, 12 Apr 2017 16:52:09 +0100 Subject: [PATCH 66/91] Entries: Use latest version of jquery-validation in demos --- entries2html.xsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entries2html.xsl b/entries2html.xsl index a319d64..bcd622d 100644 --- a/entries2html.xsl +++ b/entries2html.xsl @@ -15,8 +15,8 @@ <body> <form id="myform"></form> <script src="https://code.jquery.com/jquery-1.11.1.min.js"></script> -<script src="https://cdn.jsdelivr.net/jquery.validation/1.15.0/jquery.validate.min.js"></script> -<script src="https://cdn.jsdelivr.net/jquery.validation/1.15.0/additional-methods.min.js"></script> +<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js"></script> +<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/additional-methods.min.js"></script> <script> // just for the demos, avoids form submit jQuery.validator.setDefaults({ From e548e0b301059333cc916aad087cb668d723a37c Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Thu, 13 Apr 2017 16:41:51 +0200 Subject: [PATCH 67/91] Readme: fixed indent --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 84eed8a..6308039 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,8 @@ In this repo: * Make sure your local `wordpress` nodejs module contains [this commit](https://github.com/scottgonzalez/node-wordpress/commit/2b19238cf8064dafb66b9db09d0adcc9eac7f724) * Make sure your local config contains - * rpc-auth and basic-auth credentials - * a https jqueryvalidation url + * rpc-auth and basic-auth credentials + * a https jqueryvalidation url ### Deploy From be7e8f5a527ee7e7d1bb2d95d226d557f0650b01 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Thu, 13 Apr 2017 17:03:56 +0200 Subject: [PATCH 68/91] Readme: fixed pledgie image url --- pages/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.html b/pages/index.html index 687b0d7..4981d33 100644 --- a/pages/index.html +++ b/pages/index.html @@ -62,4 +62,4 @@

    Support

    Donate

    -Click here to lend your support to: jQuery Validation Plugin and make a donation at www.pledgie.com ! +Click here to lend your support to: jQuery Validation Plugin and make a donation at www.pledgie.com ! From bda9cab7bf0d20b72650d48f446abc565891dcd3 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 9 May 2017 18:23:17 +0200 Subject: [PATCH 69/91] Fixed typo Kudos to sparky672 --- pages/reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/reference.md b/pages/reference.md index ede64ec..f52663f 100644 --- a/pages/reference.md +++ b/pages/reference.md @@ -110,7 +110,7 @@ This used to work by adding `class="cancel"` to the input, this is now deprecate [Demo for the cancel button](https://jqueryvalidation.org/files/demo/errorcontainer-demo.html) # Validation event -By default, forms are validated on submit, triggered by the user clicking the submit button or pressing enter when a form input is focused (option `onsubmit`). In addition, once a field was highlighted as being invalid, it is validated whenever the user types something in the field (option `onkeyup`). When the user enters something invalid into a valid field, it is also validated when the field loses focus (option `onblur`). +By default, forms are validated on submit, triggered by the user clicking the submit button or pressing enter when a form input is focused (option `onsubmit`). In addition, once a field was highlighted as being invalid, it is validated whenever the user types something in the field (option `onkeyup`). When the user enters something invalid into a valid field, it is also validated when the field loses focus (option `onfocusout`). The goal of these interactions is to provide feedback as early as possible, whilst avoiding user annoyance. Displaying error messages before the user had the chance to even type something is not helpful. From 6db25363d31fa3bf23305db97026a89108b556ce Mon Sep 17 00:00:00 2001 From: sparky672 Date: Sat, 17 Jun 2017 07:40:59 -0500 Subject: [PATCH 70/91] Entries: document onclick for select elements When answering a question on StackOverflow about a broken `select` element, the OP had this option set to `false`. The `select` element was only being validated on focusout and on submit. Selecting items had no effect on validation message of this element. Removing this option, since it cannot be set to `true`, fixed the issue. Therefore, the documentation is incomplete. This option affects validation of `select` elements as well as radio and checkbox. https://jsfiddle.net/pu752c3a/ --- entries/validate.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entries/validate.xml b/entries/validate.xml index f100364..c85ac01 100644 --- a/entries/validate.xml +++ b/entries/validate.xml @@ -272,10 +272,10 @@
    - Validate checkboxes and radio buttons on click. Set to false to disable. + Validate checkboxes, radio buttons, and select elements on click. Set to false to disable.

    Set to a Function to decide for yourself when to run validation.

    A boolean true is not a valid value.

    -

    Example: Disables onclick validation of checkboxes and radio buttons.

    +

    Example: Disables onclick validation of checkboxes, radio buttons, and select elements.

    
     					$("#myform").validate({
     						onclick: false
    
    From d23a2e287b2cbc3ebc2e9991856ae167c3dbd57a Mon Sep 17 00:00:00 2001
    From: sparky672 
    Date: Sat, 17 Jun 2017 07:42:36 -0500
    Subject: [PATCH 71/91] Entries: Changed from blur to focusout (#37)
    
    Self-explanatory... certain descriptions still referred to the onfocusout/focusout option as onblur/blur.  Should be changed to reflect the actual option.
    ---
     entries/validate.xml | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/entries/validate.xml b/entries/validate.xml
    index c85ac01..2079975 100644
    --- a/entries/validate.xml
    +++ b/entries/validate.xml
    @@ -231,7 +231,7 @@
     					Validate elements (except checkboxes/radio buttons) on blur. If nothing is entered, all rules are skipped, except when the field was already marked as invalid.
     					

    Set to a Function to decide for yourself when to run validation.

    A boolean true is not a valid value.

    -

    Example: Disables onblur validation.

    +

    Example: Disables focusout validation.

    
     					$("#myform").validate({
     						onfocusout: false
    @@ -395,7 +395,7 @@
     			
     			
     				
    -					A custom message display handler. Gets the map of errors as the first argument and an array of errors as the second, called in the context of the validator object. The arguments contain only those elements currently validated, which can be a single element when doing validation onblur/keyup. You can trigger (in addition to your own messages) the default behaviour by calling this.defaultShowErrors().
    +					A custom message display handler. Gets the map of errors as the first argument and an array of errors as the second, called in the context of the validator object. The arguments contain only those elements currently validated, which can be a single element when doing validation on focusout or keyup. You can trigger (in addition to your own messages) the default behaviour by calling this.defaultShowErrors().
     					

    Example: Update the number of invalid elements each time an error is displayed. Delegates to the default implementation for the actual error display.

    
     					$("#myform").validate({
    
    From c550458d80a631b1cba6f55c85fdb8d666b92a4f Mon Sep 17 00:00:00 2001
    From: Brahim Arkni 
    Date: Sun, 25 Jun 2017 01:14:01 +0000
    Subject: [PATCH 72/91] Entries: document the ability to define a global
     normalizer (#33)
    
    ---
     entries/normalizer.xml | 68 +++++++++++++++++++++++++++++++++++++-----
     entries/validate.xml   |  7 +++++
     2 files changed, 67 insertions(+), 8 deletions(-)
    
    diff --git a/entries/normalizer.xml b/entries/normalizer.xml
    index 6310687..936e455 100644
    --- a/entries/normalizer.xml
    +++ b/entries/normalizer.xml
    @@ -8,10 +8,13 @@
     	
     	Prepares/transforms the elements value for validation.
     	
    -		Note that this method:
    -		

    Doesn't change the elements' value, it only changes the value used for validation.

    -

    Gets the value passed as argument, and "this" within it references the corresponding DOMElement.

    -

    Needs to return a String value, otherwise it will throw a TypeError exception.

    +

    Transform the value of an element and the result for validation instead of the initial value. The normalizer can be defined global to all elements or local to only one element. With that said, the local normalizer will only run for the element for which it was defined. The global normalizer will run for all validated elements. This normalizer can be then overrided for each element, as needed, by attaching one to it. This way only the local one will run for that element, and the global one will run for others.

    +

    Note that this method:

    +
      +
    • Doesn't change the elements' value, it only changes the value used for validation.

    • +
    • Gets the value passed as argument, and "this" within it references the corresponding DOMElement.

    • +
    • Needs to return a String value, otherwise it will throw a TypeError exception.

    • +
    Makes "field" required and use a normalizer to trim its value before validating @@ -38,21 +41,67 @@ $( "#myform" ).validate( { ]]> - - Makes "url" required and use a normalizer to append 'http://', if not present, to the value of the "url" element before validating + + Makes "url" required and use a normalizer to append 'http://', if not present, to the value of the "url" element before validating + + + + + + Using a global normalizer in conjunction with a local one Works with text inputs, selects, checkboxes and radio buttons.

    To force a user to select an option from a select box, provide an empty option element like <option value="">Choose...</option>

    +

    Note that white spaces are considered valid.

    The element is always required. @@ -28,7 +29,7 @@ - Makes "field" always required. Nothing and blanks are invalid. + Makes "field" always required. The plugin is written and maintained by Jörn Zaefferer, a member of the jQuery team, lead developer on the jQuery UI team and maintainer of QUnit. It was started back in the early days of jQuery in 2006, and updated and improved since then.

    -
    Current version: 1.16.0
    +
    Current version: 1.17.0
    License: MIT

    Files:

    -Download -Changelog +Download +Changelog Demos Documentation GitHub Repository @@ -33,19 +33,19 @@

    Installation via Package Managers

    Latest files on jsDelivr CDN (hotlinking welcome):

    Latest files on cdnjs CDN (hotlinking welcome):

    From e59990535100081e1c9105869b7969f7dc6a0b18 Mon Sep 17 00:00:00 2001 From: Brahim Arkni Date: Mon, 4 Sep 2017 08:03:10 +0100 Subject: [PATCH 75/91] Index: Fix jsdelivr links to follow their new automated system (#40) Ref jquery-validation/jquery-validation#2056 --- pages/index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pages/index.html b/pages/index.html index d9db348..f6dadcc 100644 --- a/pages/index.html +++ b/pages/index.html @@ -31,12 +31,12 @@

    Installation via Package Managers

    -Latest files on jsDelivr CDN (hotlinking welcome):

    +Latest files on jsDelivr CDN (hotlinking welcome):

    From 0dccc443c16843bf2801e68e29a01c50056e3d23 Mon Sep 17 00:00:00 2001 From: Rob Johnston Date: Sat, 23 Sep 2017 03:52:37 -0400 Subject: [PATCH 76/91] Entries: Fix spelling mistake, minium -> minimum. (#41) --- entries/range-method.xml | 2 +- entries/rangelength-method.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/entries/range-method.xml b/entries/range-method.xml index 72f253e..e050277 100644 --- a/entries/range-method.xml +++ b/entries/range-method.xml @@ -25,7 +25,7 @@ $( "#myform" ).validate({ }); ]]> Validate the form on submit. Set to false to use only other events for validation. -

    Set to a Function to decide for yourself when to run validation.

    -

    A boolean true is not a valid value.

    Example: Disables onsubmit validation, allowing the user to submit whatever he wants, while still validating on keyup/blur/click events (if not specified otherwise).

    
     					$("#myform").validate({
    
    From 29e3a74848f0fe26cdc3065cbb6530dce2fea87c Mon Sep 17 00:00:00 2001
    From: Brahim Arkni 
    Date: Sat, 17 Feb 2018 09:28:35 +0000
    Subject: [PATCH 78/91] Entries: Add deprecation warning to date method (#43)
    
    Ref jquery-validation/jquery-validation#1787
    ---
     entries/date-method.xml | 5 +++--
     1 file changed, 3 insertions(+), 2 deletions(-)
    
    diff --git a/entries/date-method.xml b/entries/date-method.xml
    index bdeaa86..4d2285b 100644
    --- a/entries/date-method.xml
    +++ b/entries/date-method.xml
    @@ -1,10 +1,11 @@
     
     
    -	date method
    +	[DEPRECATED] date method
     	Makes the element require a date.
     	
     		Return true if the value is a valid date. Uses JavaScript's built-in Date to test if the date is valid, and therefore does no sanity checks. Only the format must be valid, not the actual date, eg 30/30/2008 is a valid date.
    -		

    This method should not be used, since it relies on the new Date constructor, which behaves very differently across browsers and locales. Use dateISO instead or one of the locale specific methods (in localizations/ and additional-methods.js).

    +

    DEPRECATION warning:

    +

    This method is deprecated and will be removed in version 2.0.0.
    Please don't use it, since it relies on the Date constructor, which behaves very differently across browsers and locales. Use dateISO instead or one of the locale specific methods (in localizations/ and additional-methods.js).

    Makes "field" required and a date. From a098cf901832ab5bb59cd31e729bcef2c6936e54 Mon Sep 17 00:00:00 2001 From: Brahim Arkni Date: Wed, 21 Feb 2018 10:07:30 +0000 Subject: [PATCH 79/91] Index: Remove Pledgie links from home page (#44) Pledgie has shutdown on 2018-02-08. For reference, see this tweet from their Twitter: https://twitter.com/pledgie/status/949360957419114497 --- pages/index.html | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pages/index.html b/pages/index.html index f6dadcc..abb48c1 100644 --- a/pages/index.html +++ b/pages/index.html @@ -7,10 +7,6 @@

    For a quick overview of what this plugin provides, check out this Webucator video (they also provide jQuery trainings):

    -

    If you use this plugin, you should support the ongoing development by donating to the pledgie.org campagin.

    - -Click here to lend your support to: jQuery Validation Plugin and make a donation -

    The plugin is written and maintained by Jörn Zaefferer, a member of the jQuery team, lead developer on the jQuery UI team and maintainer of QUnit. It was started back in the early days of jQuery in 2006, and updated and improved since then.

    Current version: 1.17.0
    @@ -60,6 +56,3 @@

    Support

  • Please post questions to the official using jQuery Plugins Forum, tagging your question with (at least) "validate". Keep your question short and succinct and provide code when possible; a testpage makes it much more likely that you get an useful answer in a shorter time.
  • Please post bug reports and other contributions (enhancements, features, eg. new validation methods) to the GitHub issue tracker
  • - -

    Donate

    -Click here to lend your support to: jQuery Validation Plugin and make a donation at www.pledgie.com ! From c93f636b6c7f39e0d880e7c142b0f16a4927a792 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Wed, 16 May 2018 10:08:14 +0200 Subject: [PATCH 80/91] Index: Add more infos about the core team (#45) --- pages/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/index.html b/pages/index.html index abb48c1..30b0dd9 100644 --- a/pages/index.html +++ b/pages/index.html @@ -7,7 +7,8 @@

    For a quick overview of what this plugin provides, check out this Webucator video (they also provide jQuery trainings):

    -

    The plugin is written and maintained by Jörn Zaefferer, a member of the jQuery team, lead developer on the jQuery UI team and maintainer of QUnit. It was started back in the early days of jQuery in 2006, and updated and improved since then.

    +

    The plugin was initially written and maintained by Jörn Zaefferer, a member of the jQuery team, lead developer on the jQuery UI team and maintainer of QUnit. It was started back in the early days of jQuery in 2006, and updated and improved since then.

    +

    Starting with Version 1.15.0 Markus Staab took over the maintenance of the codebase in February 2016. Since July 2016 Brahim Arkni assisted Markus, and a few months later Brahim joined the jQuery Validation core team.

    Current version: 1.17.0
    License: MIT
    From 7663d4ff9cd9a859d8064a078d412e7ebcd8167a Mon Sep 17 00:00:00 2001 From: Brahim Arkni Date: Mon, 4 Jun 2018 06:48:03 +0000 Subject: [PATCH 81/91] Entries: Fix `submitHandler`'s arguments description (#46) A follow-up of #26 --- entries/validate.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entries/validate.xml b/entries/validate.xml index 25f6b49..6a86ad5 100644 --- a/entries/validate.xml +++ b/entries/validate.xml @@ -25,7 +25,7 @@ - Callback for handling the actual submit when the form is valid. Gets the form as the only argument. Replaces the default submit. The right place to submit a form via Ajax after it is validated. + Callback for handling the actual submit when the form is valid. Gets the form and the submit event as the only arguments. Replaces the default submit. The right place to submit a form via Ajax after it is validated.

    Example: Submits the form via Ajax when valid.

    
     					$("#myform").validate({
    
    From 13f253378a84de4f892b9fecccb3e846b13cf588 Mon Sep 17 00:00:00 2001
    From: Brahim Arkni 
    Date: Sun, 10 Jun 2018 14:53:48 +0000
    Subject: [PATCH 82/91] Entries: Add link to jQuery Form plugin to
     submitHandler example (#48)
    
    Fixes jquery-validation/jquery-validation#2181
    ---
     entries/validate.xml | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/entries/validate.xml b/entries/validate.xml
    index 6a86ad5..0a50c39 100644
    --- a/entries/validate.xml
    +++ b/entries/validate.xml
    @@ -25,8 +25,8 @@
     			
     			
     				
    -					Callback for handling the actual submit when the form is valid. Gets the form and the submit event as the only arguments. Replaces the default submit. The right place to submit a form via Ajax after it is validated.
    -					

    Example: Submits the form via Ajax when valid.

    + Callback for handling the actual submit when the form is valid. Gets the form and the submit event as the only arguments. Replaces the default submit. The right place to submit a form via Ajax after it is validated. +

    Example: Submits the form via Ajax, using jQuery Form plugin, when valid.

    
     					$("#myform").validate({
     						submitHandler: function(form) {
    
    From 7454d0c5f4e71f2f0fc42ae00248f9558e83aa73 Mon Sep 17 00:00:00 2001
    From: Brahim Arkni 
    Date: Tue, 7 Aug 2018 06:56:28 +0100
    Subject: [PATCH 83/91] Entries: Add note about validation behavior change to
     email method (#47)
    
    Fixes jquery-validation/jquery-validation#2162
    ---
     entries/email-method.xml | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/entries/email-method.xml b/entries/email-method.xml
    index a0aedbe..b0ba4e9 100644
    --- a/entries/email-method.xml
    +++ b/entries/email-method.xml
    @@ -5,7 +5,8 @@
     	
     		Return true if the value is a valid email address.
     		

    Works with text inputs.

    -

    In case you need a custom email pattern use the $.validator.methods property.

    +

    IMPORTANT NOTE:

    +

    As of version 1.12.0 we started using the same regular expression that the HTML5 specification suggests for browsers to use. We will follow their lead and use the same check. In case you need to adjust the built-in validation regular expression patterns, please use the $.validator.methods property. If you have different requirements, please consider using a custom method.

    Makes "field" required and an email address. From b4ed660db698525b0a8ac7b4244743d198f7ddad Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Wed, 28 Nov 2018 19:37:20 +0100 Subject: [PATCH 84/91] Entries: mention 1.19.0 release --- pages/index.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pages/index.html b/pages/index.html index 30b0dd9..f83f7f9 100644 --- a/pages/index.html +++ b/pages/index.html @@ -10,12 +10,12 @@

    The plugin was initially written and maintained by Jörn Zaefferer, a member of the jQuery team, lead developer on the jQuery UI team and maintainer of QUnit. It was started back in the early days of jQuery in 2006, and updated and improved since then.

    Starting with Version 1.15.0 Markus Staab took over the maintenance of the codebase in February 2016. Since July 2016 Brahim Arkni assisted Markus, and a few months later Brahim joined the jQuery Validation core team.

    -
    Current version: 1.17.0
    +
    Current version: 1.19.0
    License: MIT

    Files:

    -Download -Changelog +Download +Changelog Demos Documentation GitHub Repository @@ -30,19 +30,19 @@

    Installation via Package Managers

    Latest files on jsDelivr CDN (hotlinking welcome):

    Latest files on cdnjs CDN (hotlinking welcome):

    From 7eeb403a9a3bc842953502b478781999a904d6f0 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Wed, 28 Nov 2018 19:41:42 +0100 Subject: [PATCH 85/91] Build: added a package-log --- package-lock.json | 412 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 412 insertions(+) create mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..cfbfc18 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,412 @@ +{ + "name": "jqueryvalidation-content", + "version": "1.0.0", + "lockfileVersion": 1, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + }, + "argparse": { + "version": "0.1.16", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-0.1.16.tgz", + "integrity": "sha1-z9AeD7uj1srtBJ+9dY1A9lGW9Xw=", + "dependencies": { + "underscore.string": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.4.0.tgz", + "integrity": "sha1-jN2PusTi0uoefi6Al8QvRCKA+Fs=" + } + } + }, + "async": { + "version": "0.1.22", + "resolved": "https://registry.npmjs.org/async/-/async-0.1.22.tgz", + "integrity": "sha1-D8GqoIig4+8Ovi2IMbqw3PiEUGE=" + }, + "cheerio": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.17.0.tgz", + "integrity": "sha1-+lrkLMYBIRM9KW0LRtmDIV9yaOo=", + "dependencies": { + "lodash": { + "version": "2.4.2", + "resolved": "http://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", + "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=" + } + } + }, + "coffee-script": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.3.3.tgz", + "integrity": "sha1-FQ1rTLUiiUNp7+1qIQHCC8f0pPQ=" + }, + "colors": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", + "integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w=" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "CSSselect": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/CSSselect/-/CSSselect-0.4.1.tgz", + "integrity": "sha1-+Kt+H4QYzmPNput713ioXX7EkrI=" + }, + "CSSwhat": { + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/CSSwhat/-/CSSwhat-0.4.7.tgz", + "integrity": "sha1-hn2g/zn3eGEyQsRM/qg/CqTr35s=" + }, + "dateformat": { + "version": "1.0.2-1.2.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.2-1.2.3.tgz", + "integrity": "sha1-sCIMAt6YYXQztyhRz0fePfLNvuk=" + }, + "dom-serializer": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.0.1.tgz", + "integrity": "sha1-lYmCfx4y0iw3yCmtq9WbMkevjq8=", + "dependencies": { + "domelementtype": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", + "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=" + } + } + }, + "domelementtype": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", + "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=" + }, + "domhandler": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.2.1.tgz", + "integrity": "sha1-Wd+dzSJ+gIs2Wuc+H2aErD2Ub8I=" + }, + "domutils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.4.3.tgz", + "integrity": "sha1-CGVRN5bGswYDGFDhdVFrr4C3Km8=" + }, + "entities": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", + "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=" + }, + "esprima": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz", + "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0=" + }, + "eventemitter2": { + "version": "0.4.14", + "resolved": "http://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", + "integrity": "sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas=" + }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=" + }, + "findup-sync": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.1.3.tgz", + "integrity": "sha1-fz56l7gjksZTvwZYm9hRkOk8NoM=", + "dependencies": { + "glob": { + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", + "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=" + }, + "lodash": { + "version": "2.4.2", + "resolved": "http://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", + "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=" + }, + "minimatch": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", + "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=" + } + } + }, + "getobject": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz", + "integrity": "sha1-BHpEl4n6Fg0Bj1SG7ZEyC27HiFw=" + }, + "gilded-wordpress": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gilded-wordpress/-/gilded-wordpress-1.0.0.tgz", + "integrity": "sha1-xqLn1wetWX2pMQdeAcL+iBtttaA=", + "dependencies": { + "async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=" + }, + "glob": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-4.0.6.tgz", + "integrity": "sha1-aVxQvdTi+1xdNwsJHziNNwfikac=" + }, + "graceful-fs": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", + "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=" + }, + "minimatch": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz", + "integrity": "sha1-4N0hILSeG3JM6NcUxSCCKpQ4V20=" + } + } + }, + "glob": { + "version": "3.1.21", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", + "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", + "dependencies": { + "inherits": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", + "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=" + } + } + }, + "graceful-fs": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", + "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=" + }, + "grunt": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/grunt/-/grunt-0.4.5.tgz", + "integrity": "sha1-VpN81RlDJK3/bSB2MYMqnWuk5/A=" + }, + "grunt-check-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/grunt-check-modules/-/grunt-check-modules-1.0.0.tgz", + "integrity": "sha1-Y/9erkYTF5tKifaozTcfekAfd4I=" + }, + "grunt-jquery-content": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/grunt-jquery-content/-/grunt-jquery-content-2.0.0.tgz", + "integrity": "sha1-jVFDOs0z/n7VL9956gAxwCRSwII=", + "dependencies": { + "async": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.0.tgz", + "integrity": "sha1-rDYTsdqb7RtHUQu0ZRuJMeRxRsc=" + }, + "which": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/which/-/which-1.0.5.tgz", + "integrity": "sha1-VjDWgZ3aaS8UZEYueVbLQsCEJzk=" + } + } + }, + "grunt-legacy-log": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-0.1.3.tgz", + "integrity": "sha1-7ClCboAwIa9ZAp+H0vnNczWgVTE=", + "dependencies": { + "lodash": { + "version": "2.4.2", + "resolved": "http://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", + "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=" + }, + "underscore.string": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz", + "integrity": "sha1-ccCL9rQosRM/N+ePo6Icgvcymw0=" + } + } + }, + "grunt-legacy-log-utils": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-0.1.1.tgz", + "integrity": "sha1-wHBrndkGThFvNvI/5OawSGcsD34=", + "dependencies": { + "lodash": { + "version": "2.4.2", + "resolved": "http://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", + "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=" + }, + "underscore.string": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz", + "integrity": "sha1-ccCL9rQosRM/N+ePo6Icgvcymw0=" + } + } + }, + "grunt-legacy-util": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-0.2.0.tgz", + "integrity": "sha1-kzJIhNv343qf98Am3/RR2UqeVUs=" + }, + "grunt-wordpress": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/grunt-wordpress/-/grunt-wordpress-2.1.0.tgz", + "integrity": "sha1-ty0EttVbQdFP/Yrq8W0ibFk9vl0=" + }, + "he": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/he/-/he-0.5.0.tgz", + "integrity": "sha1-LAX/rvkLaOhg8/0rVO9YCYknfuI=" + }, + "highlight.js": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-7.3.0.tgz", + "integrity": "sha1-bF8PZOcHj2ZAK82/yJEQw/0bqZ8=" + }, + "hooker": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", + "integrity": "sha1-uDT3I8xKJCqmWWNFnfbZhMXT2Vk=" + }, + "htmlparser2": { + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.7.3.tgz", + "integrity": "sha1-amTHdjfAjG8w7CqBV6UzM758sF4=", + "dependencies": { + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=" + }, + "entities": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", + "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=" + } + } + }, + "iconv-lite": { + "version": "0.2.11", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz", + "integrity": "sha1-HOYKOleGSiktEyH/RgnKS7llrcg=" + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "js-yaml": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-2.0.5.tgz", + "integrity": "sha1-olrmUJmZ6X3yeMZxnaEb0Gh3Q6g=" + }, + "lodash": { + "version": "0.9.2", + "resolved": "http://registry.npmjs.org/lodash/-/lodash-0.9.2.tgz", + "integrity": "sha1-jzSZxSRdNG1oLlsNO0B2fgnxqSw=" + }, + "lru-cache": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", + "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=" + }, + "marked": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.2.tgz", + "integrity": "sha1-AV2xWIZEOPJKZL3WGgQotBhwbQk=" + }, + "minimatch": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", + "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=" + }, + "natives": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.4.tgz", + "integrity": "sha512-Q29yeg9aFKwhLVdkTAejM/HvYG0Y1Am1+HUkFQGn5k2j8GS+v60TVmZh6nujpEAj/qql+wGUrlryO8bF+b1jEg==" + }, + "nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=" + }, + "rimraf": { + "version": "2.2.8", + "resolved": "http://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", + "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=" + }, + "sax": { + "version": "0.4.3", + "resolved": "http://registry.npmjs.org/sax/-/sax-0.4.3.tgz", + "integrity": "sha1-cA46NOsueSzjgHkccSgPNzGWXdw=" + }, + "sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=" + }, + "spawnback": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/spawnback/-/spawnback-1.0.0.tgz", + "integrity": "sha1-9zZi9+VNlTZ+ynTWQmxnfdfqaG8=" + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "underscore": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", + "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=" + }, + "underscore.string": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.2.1.tgz", + "integrity": "sha1-18D6KvXVoaZ/QlPa7pgTLnM/Dxk=" + }, + "which": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/which/-/which-1.0.9.tgz", + "integrity": "sha1-RgwdoPgQED0DIam2M6+eV15kSG8=" + }, + "wordpress": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordpress/-/wordpress-1.0.0.tgz", + "integrity": "sha1-m+FQ5pObYUnVw0F017UIeOK7s88=" + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "xmlbuilder": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-0.3.1.tgz", + "integrity": "sha1-XtTCK0YiwkN/r4Pk8jbyPWu/JkE=" + }, + "xmlrpc": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/xmlrpc/-/xmlrpc-1.0.1.tgz", + "integrity": "sha1-QZcSWnn5mG1Ih2cVqC0Gj+8WiuM=" + } + } +} From 1d21c702418b476f9aba4d0431d1b8198ab851d7 Mon Sep 17 00:00:00 2001 From: Brahim Arkni Date: Thu, 29 Nov 2018 12:43:56 +0000 Subject: [PATCH 86/91] Entries: Note that the normalizer can return any value (#39) Ref jquery-validation/jquery-validation#2054 --- entries/normalizer.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/entries/normalizer.xml b/entries/normalizer.xml index 936e455..aa13830 100644 --- a/entries/normalizer.xml +++ b/entries/normalizer.xml @@ -11,9 +11,10 @@

    Transform the value of an element and the result for validation instead of the initial value. The normalizer can be defined global to all elements or local to only one element. With that said, the local normalizer will only run for the element for which it was defined. The global normalizer will run for all validated elements. This normalizer can be then overrided for each element, as needed, by attaching one to it. This way only the local one will run for that element, and the global one will run for others.

    Note that this method:

      +
    • Has been available since version 1.15.0

    • Doesn't change the elements' value, it only changes the value used for validation.

    • Gets the value passed as argument, and "this" within it references the corresponding DOMElement.

    • -
    • Needs to return a String value, otherwise it will throw a TypeError exception.

    • +
    • For versions between 1.15.0 and 1.17.0, it must return a string value. And as of 1.17.1, it can return any value including null and undefined.

    From aed54969737698ed043998977d99da3b421a7e04 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Sat, 15 Jun 2019 08:35:51 +0200 Subject: [PATCH 87/91] Entries: mention 1.19.1 release --- pages/index.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pages/index.html b/pages/index.html index f83f7f9..16a2777 100644 --- a/pages/index.html +++ b/pages/index.html @@ -10,12 +10,12 @@

    The plugin was initially written and maintained by Jörn Zaefferer, a member of the jQuery team, lead developer on the jQuery UI team and maintainer of QUnit. It was started back in the early days of jQuery in 2006, and updated and improved since then.

    Starting with Version 1.15.0 Markus Staab took over the maintenance of the codebase in February 2016. Since July 2016 Brahim Arkni assisted Markus, and a few months later Brahim joined the jQuery Validation core team.

    -
    Current version: 1.19.0
    +
    Current version: 1.19.1
    License: MIT

    Files:

    -Download -Changelog +Download +Changelog Demos Documentation GitHub Repository @@ -30,19 +30,19 @@

    Installation via Package Managers

    Latest files on jsDelivr CDN (hotlinking welcome):

    Latest files on cdnjs CDN (hotlinking welcome):

    From 43ac3a51391ccccabf5247cae3fd9fc26a410bd1 Mon Sep 17 00:00:00 2001 From: "s.protasov" Date: Mon, 28 Oct 2019 11:29:09 +0300 Subject: [PATCH 88/91] Fix message usage example in validate (#49) https://jqueryvalidation.org/validate/#messages First line of example code --- entries/validate.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entries/validate.xml b/entries/validate.xml index 0a50c39..640ed6c 100644 --- a/entries/validate.xml +++ b/entries/validate.xml @@ -154,7 +154,7 @@ Key/value pairs defining custom messages. Key is the name of an element, value the message to display for that element. Instead of a plain message, another map with specific messages for each rule can be used. Overrides the title attribute of an element or the default message for the method (in that order). Each message can be a String or a Callback. The callback is called in the scope of the validator, with the rule's parameters as the first argument and the element as the second, and must return a String to display as the message.

    Example: Specifies a name element as required and an email element as required and a valid email address. A single message is specified for the name element, and two messages for email.

    
    -					$$("#myform").validate({
    +					$("#myform").validate({
     						rules: {
     							name: "required",
     							email: {
    
    From ea98b55611e0407ad064ea865ff390d514b9d985 Mon Sep 17 00:00:00 2001
    From: Markus Staab 
    Date: Sat, 9 Jan 2021 17:02:03 +0100
    Subject: [PATCH 89/91] Entries: mention 1.19.3 release (#51)
    
    ---
     pages/index.html | 22 +++++++++++-----------
     1 file changed, 11 insertions(+), 11 deletions(-)
    
    diff --git a/pages/index.html b/pages/index.html
    index 16a2777..bb748f9 100644
    --- a/pages/index.html
    +++ b/pages/index.html
    @@ -10,12 +10,12 @@
     

    The plugin was initially written and maintained by Jörn Zaefferer, a member of the jQuery team, lead developer on the jQuery UI team and maintainer of QUnit. It was started back in the early days of jQuery in 2006, and updated and improved since then.

    Starting with Version 1.15.0 Markus Staab took over the maintenance of the codebase in February 2016. Since July 2016 Brahim Arkni assisted Markus, and a few months later Brahim joined the jQuery Validation core team.

    -
    Current version: 1.19.1
    +
    Current version: 1.19.3
    License: MIT

    Files:

    -Download -Changelog +Download +Changelog Demos Documentation GitHub Repository @@ -30,19 +30,19 @@

    Installation via Package Managers

    Latest files on jsDelivr CDN (hotlinking welcome):

    Latest files on cdnjs CDN (hotlinking welcome):

    From e180925fda919d51fcd39c688691e8bc5e868b52 Mon Sep 17 00:00:00 2001 From: Tracy Logan Date: Tue, 30 Nov 2021 15:26:49 -0500 Subject: [PATCH 90/91] Fix typos, clarify code usages (#53) --- pages/reference.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pages/reference.md b/pages/reference.md index f52663f..535c9b6 100644 --- a/pages/reference.md +++ b/pages/reference.md @@ -7,7 +7,7 @@ The ultimate goal of this plugin is to make working with forms more fun for ever To achieve this, it is important that the plugin is actually deployed on websites around the world, so a lot of focus is spent on making it easy for developers - that's you - to use the plugin. -The plugin can never replace serverside validation and doesn't intend to do so. Having both in place gives you the necessary security for your application, as well as improved usability. +The plugin can never replace server-side validation and doesn't intend to do so. Having both in place gives you the necessary security for your application, as well as improved usability. # Markup recommendations Mandated: A 'name' attribute is required for all input elements needing validation, and the plugin will not work without this. A 'name' attribute must also be unique to the form, as this is how the plugin keeps track of all input elements. However, each group of radio or checkbox elements will share the same 'name' since the value of this grouping represents a single piece of the form data. @@ -20,7 +20,7 @@ Optionally: Each input can have a label associated with it, where the 'for' attr ``` # Methods -A validation method implements the logic to validate any element. Provided are a set of default validation methods, such as required. Apart from required itself and equalTo, all validation methods declare an element valid when it has no value at all. That way an email field is optional unless required is specified. You can specify an element input to contain a valid email address, or nothing at all. Use jQuery.validator.addMethod to implement custom methods. +A validation method implements the logic to validate any element. Provided are a set of default validation methods, such as `required`. Apart from `required` itself and `equalTo`, all validation methods declare an element valid when it has no value at all. That way an email field is optional unless `required` is specified. You can specify an element input to contain a valid email address, or nothing at all. Use jQuery.validator.addMethod to implement custom methods. # Rules A validation rule applies one or more validation methods to an input element. You can specify validation rules via metadata or via plugin settings (option `rules`). The decision is often influenced by serverside infrastructure. If a web framework is used, it is often easier to use metadata, which is also good for fast prototyping. Plugin settings produce cleaner markup, though valid markup results from both. @@ -42,7 +42,7 @@ If your form consists of fields using names that aren't legal JavaScript identif ``` ## Refactoring rules -Whenever you have multiple fields with the same rules and messages, refactoring those can reduce a lot of duplication. Using addMethod and addClassRules are most effective for that. +Whenever you have multiple fields with the same rules and messages, refactoring those can reduce a lot of duplication. Using `addMethod()` and `addClassRules()` are most effective for that. Let's consider an example where you have ten customer fields, each required and with a minlength of 2. You need custom messages for both rules. To avoid having to specify those rules and messages again and again, we can alias existing methods with different messages and group them into a single class: @@ -66,7 +66,7 @@ With that in place, we can add a class customer to all customer fields and be do ``` -You can also reuse existing methods inside other custom methods, to reuse certain implementations. For example, if you're writing a custom method for validating email addresses inside a single field, you could call the existing email method for each email: +You can also reuse existing methods inside other custom methods, to reuse certain implementations. For example, if you're writing a custom method for validating email addresses inside a single field, you could call the existing `email` method for each email: ```js jQuery.validator.methods.email.call(this, email, element) @@ -82,7 +82,7 @@ The priorities are as follows: A custom message (passed by plugin options), the When using data attributes, you can set a generic message for all rules, or specific messages per rule: ```html - + ``` # Error message display @@ -98,7 +98,7 @@ By default, the first invalid element in a form is focused after submitting a fo By default, the form submission is prevented when the form is invalid, and submitted as normal when it is valid. You can also handle the submission manually (option `submitHandler`). ## Skipping validation on submit -To skip validation while still using a submit-button, add the attribte "formnovalidate" to that input: +To skip validation while still using a submit-button, add the attribute "formnovalidate" to that input: ```html From 5b5ff32b8ff630c6d46d8adab37694f805a5ae0d Mon Sep 17 00:00:00 2001 From: Kieran Date: Fri, 1 Jul 2022 18:15:17 +0100 Subject: [PATCH 91/91] Entries: mention 1.19.5 release (#55) * Entries: mention 1.19.4 release * 1.19.5 --- pages/index.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pages/index.html b/pages/index.html index bb748f9..d6df4f7 100644 --- a/pages/index.html +++ b/pages/index.html @@ -10,12 +10,12 @@

    The plugin was initially written and maintained by Jörn Zaefferer, a member of the jQuery team, lead developer on the jQuery UI team and maintainer of QUnit. It was started back in the early days of jQuery in 2006, and updated and improved since then.

    Starting with Version 1.15.0 Markus Staab took over the maintenance of the codebase in February 2016. Since July 2016 Brahim Arkni assisted Markus, and a few months later Brahim joined the jQuery Validation core team.

    -
    Current version: 1.19.3
    +
    Current version: 1.19.5
    License: MIT

    Files:

    -Download -Changelog +Download +Changelog Demos Documentation GitHub Repository @@ -30,19 +30,19 @@

    Installation via Package Managers

    Latest files on jsDelivr CDN (hotlinking welcome):

    Latest files on cdnjs CDN (hotlinking welcome):