|
2 | 2 | * jQuery Form Validation |
3 | 3 | * |
4 | 4 | * @author Tom Bertrand |
5 | | - * @version 1.3.1 (2014-07-31) |
| 5 | + * @version 1.3.2 (2014-08-1) |
6 | 6 | * |
7 | 7 | * @copyright |
8 | 8 | * Copyright (C) 2014 Tom Bertrand. |
|
238 | 238 | continue; |
239 | 239 | } |
240 | 240 |
|
241 | | - if (options.debug && (!_options[method] || !(options[method] instanceof Object))) { |
| 241 | + if (!_options[method] || !(options[method] instanceof Object)) { |
242 | 242 |
|
243 | | - window.Debug.log({ |
| 243 | + options.debug && window.Debug.log({ |
244 | 244 | 'node': node, |
245 | 245 | 'function': 'extendOptions()', |
246 | 246 | 'arguments': '{' + method + ': ' + JSON.stringify(options[method]) + '}', |
|
327 | 327 | 'message': 'OK - Dynamic Validation activated on ' + $(node).length + ' form(s)' |
328 | 328 | }); |
329 | 329 |
|
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({ |
332 | 332 | 'node': node, |
333 | 333 | 'function': 'delegateDynamicValidation()', |
334 | 334 | 'arguments': '$(node).find([' + _data.validation + '],[' + _data.regex + '])', |
|
405 | 405 | 'message': 'OK - Validation activated on ' + $(node).length + ' form(s)' |
406 | 406 | }); |
407 | 407 |
|
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({ |
410 | 411 | 'node': node, |
411 | 412 | 'function': 'delegateDynamicValidation()', |
412 | 413 | 'arguments': '$(node).find(' + options.submit.settings.button + ')', |
413 | 414 | 'message': 'ERROR - ' + options.submit.settings.button + ' not found' |
414 | 415 | }); |
415 | 416 | return false; |
| 417 | + |
416 | 418 | } |
417 | 419 |
|
418 | 420 | $(node).on("submit", false ); |
|
0 commit comments