|
121 | 121 | insertion: "append", |
122 | 122 | allErrors: false, |
123 | 123 | trigger: "click", |
124 | | - button: "input[type='submit']", |
| 124 | + button: "[type='submit']", |
125 | 125 | errorClass: "error", |
126 | 126 | errorListClass: "error-list", |
127 | 127 | inputContainer: null, |
|
478 | 478 | var isValid = true; |
479 | 479 |
|
480 | 480 | $.each( |
481 | | - node.find('[' + _data.validation + '],[' + _data.regex + ']'), |
| 481 | + node.find('[' + _data.validation + ']:not([readonly], [disabled]),[' + _data.regex + ']:not([readonly], [disabled])'), |
482 | 482 | function (index, input) { |
483 | 483 |
|
484 | 484 | if ($(this).is(':disabled')) { |
|
747 | 747 | } |
748 | 748 |
|
749 | 749 | } else { |
750 | | - // Compare numeric value |
| 750 | + // Compare numeric value |
751 | 751 | if (!value || isNaN(value) || !eval(value + operator + parseFloat(compared))) { |
752 | 752 | throw [options.messages[operator].replace(' characters', ''), compared]; |
753 | 753 | } |
|
879 | 879 |
|
880 | 880 | if (options.submit.settings.display === "inline" || |
881 | 881 | (options.submit.settings.display === "block" && !errorContainer.find('[' + _data.errorList + ']')[0]) |
882 | | - ) { |
| 882 | + ) { |
883 | 883 | if (options.submit.settings.insertion === 'append') { |
884 | 884 | errorContainer.append(html); |
885 | 885 | } else if (options.submit.settings.insertion === 'prepend') { |
|
1433 | 1433 |
|
1434 | 1434 | node = $(options.submit.settings.form); |
1435 | 1435 |
|
1436 | | - if (!node[0]) { |
| 1436 | + if (!node[0] || node[0].nodeName.toLowerCase() !== "form") { |
1437 | 1437 |
|
1438 | 1438 | // {debug} |
1439 | 1439 | window.Debug.log({ |
1440 | | - 'node': node, |
1441 | 1440 | 'function': '$.validate()', |
1442 | 1441 | 'arguments': JSON.stringify(options.submit.settings.form), |
1443 | 1442 | 'message': 'Unable to find jQuery form element - Validation dropped' |
|
0 commit comments