Skip to content

Commit 12873a9

Browse files
committed
1.3.2
Fixed some debug cases. Removed the Debug code from the minified javascript file jquery.validation.min to reduce it's size by 25% for production environment.
1 parent 31bc68c commit 12873a9

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

html5-form-validation.jquery.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"validation",
1010
"input"
1111
],
12-
"version": "1.3.1",
12+
"version": "1.3.2",
1313
"author": {
1414
"name": "Tom Bertrand",
1515
"url": "http://www.runningcoder.org/jqueryvalidation/"

jquery.validation.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* jQuery Form Validation
33
*
44
* @author Tom Bertrand
5-
* @version 1.3.1 (2014-07-31)
5+
* @version 1.3.2 (2014-08-1)
66
*
77
* @copyright
88
* Copyright (C) 2014 Tom Bertrand.
@@ -238,9 +238,9 @@
238238
continue;
239239
}
240240

241-
if (options.debug && (!_options[method] || !(options[method] instanceof Object))) {
241+
if (!_options[method] || !(options[method] instanceof Object)) {
242242

243-
window.Debug.log({
243+
options.debug && window.Debug.log({
244244
'node': node,
245245
'function': 'extendOptions()',
246246
'arguments': '{' + method + ': ' + JSON.stringify(options[method]) + '}',
@@ -327,8 +327,8 @@
327327
'message': 'OK - Dynamic Validation activated on ' + $(node).length + ' form(s)'
328328
});
329329

330-
if (options.debug && !$(node).find('[' + _data.validation + '],[' + _data.regex + ']')[0]) {
331-
window.Debug.log({
330+
if ( !$(node).find('[' + _data.validation + '],[' + _data.regex + ']')[0]) {
331+
options.debug && window.Debug.log({
332332
'node': node,
333333
'function': 'delegateDynamicValidation()',
334334
'arguments': '$(node).find([' + _data.validation + '],[' + _data.regex + '])',
@@ -405,14 +405,16 @@
405405
'message': 'OK - Validation activated on ' + $(node).length + ' form(s)'
406406
});
407407

408-
if (options.debug && !$(node).find(options.submit.settings.button)[0]) {
409-
window.Debug.log({
408+
if (!$(node).find(options.submit.settings.button)[0]) {
409+
410+
options.debug && window.Debug.log({
410411
'node': node,
411412
'function': 'delegateDynamicValidation()',
412413
'arguments': '$(node).find(' + options.submit.settings.button + ')',
413414
'message': 'ERROR - ' + options.submit.settings.button + ' not found'
414415
});
415416
return false;
417+
416418
}
417419

418420
$(node).on("submit", false );

0 commit comments

Comments
 (0)